Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Why can't i use 'date' , 'now' etc in some computers?

  Asked By: Cindy    Date: Aug 16    Category: MS Office    Views: 532
  

In my code, i have 'date' and 'now'. The code is working properly. But when i
run the code in another computer it makes an error on 'date'. What is the
problem? Are some DLLs missing or should i go Tools>References and click some
objects? I hope somebody can help me.

I have one more question;

I get a newer version of Office CD from my friend. Office 12 or some calls it
Office 2006. I took it just for VBA. I thought maybe there's a newer version of
VBE in Office 2006. But after install when i start Excel, it said:"Pre-release
expired" or something like that. If there's no newer version of VBE in it,then i
can continue with Office 2003. But,if there is, could somebody tell me,how can i
solve this "expired" problem?

Share: 

 

5 Answers Found

 
Answer #1    Answered By: Bohdana Nonob     Answered On: Aug 16

You need to post your code. Also indicate what versions of Excel you are
using on both machines.

When I did a Google search for Office 2006, the first result took me to the
Office 2007 site which has information about getting the beta evaluation
copy.

 
Answer #2    Answered By: Atid Boonliang     Answered On: Aug 16

Office 12, aka Office 2007, is the next version  of Office that should be
released next year and is currently available as a public beta. The expiry
date for the beta is at the end of the year. If the product has expired,
then it is a copy of the alpha release or beta 1. Neither of which are
public trials. Those who received these signed an NDA promising not to
distribute.

The public beta is available from one of the Microsoft websites.

 
Answer #3    Answered By: Hayden Evans     Answered On: Aug 16

I have to make some changes in my question.

The pre-defined function,which makes an error  was not 'date' or 'now', it was
'mid'(pre-defined string function)

Here is the code:

Private Sub Not_Txt_OverLength_Control()
If Len(Not_Txt.Text) > (2 ^ 15 - 1500) Then
LetCount_Lbl.ForeColor = vbRed
If Len(Not_Txt.Text) > (2 ^ 15 - 1) Then Not_Txt.Text =
Mid(Not_Txt.Text, 1, Len(Not_Txt) - 1) 'Here is the Problem!!!
If Len(Not_Txt.Text) > (2 ^ 15 - 500) Then LetCount_Lbl.Font.Underline =
True
Else
LetCount_Lbl.ForeColor = vbBlack
LetCount_Lbl.Font.Underline = False
End If
End Sub

But i think this problem is more interesting than you thought. I have the same
code in two excel files. Both files has the same name in different folders.
NewGenSys.xls in Folder A runs properly with this code. But the (99,9%) the same
file NewGenSys.xls in Folder B makes an error here. Does it make sense?

When i write "mid(" in the code  window in the files in Folder A, VBA shows a
hint to understand the function (as you know); "Mid(String, Start As Long,
[Lenght])" and it works normally. But in the Folder B if write mid, VBA doesn't
reacts with a helptiptext like the other xls file.

How can it be possible? In the same computer, the same code is working  in one
file but not working in the other one.

Can you make a logical explanation?

 
Answer #4    Answered By: Sairah Hashmi     Answered On: Aug 16

The VBE is pretty much the same in Excel 2007 Public Beta 2. Tonight I am going
to explore a bit more, and I expect to find some new functions, but most of my
old code  works out of the box.

 
Answer #5    Answered By: Rosa Reynolds     Answered On: Aug 16

I asked what versions of Excel you were using, but you haven't supplied that
information.

You are doing a length test with a very large number in it. IIRC earlier
versions of Excel didn't allow cells to contain as much text as they do now
(or at least didn't allow VBA to manipulate them), and 2^15 is a very long
string.

I occasionally have trouble with long cells and Excel VBA 2000, where the
VBA can't handle the amount of text that can be placed in the cell. (And
this certainly occurs much earlier than the 32,000 or so characters you're
talking about.)

Which of the parts of the indicated line is the problem? What exactly is
the error?

I can't make a logical explanation if you can't make a logical description
of the problem. :-) You need to supply exact details of what you are
doing.

When you have a line like the one you have flagged, it is not enough to say
"Here is the problem". On what part of the line is the problem? You need
to break out the separate parts and see what it doesn't like. And
especially, you should not be sending the line with both an IF statement and
an assignment statement on it. Break this line out so that the assignment
is on a separate line.

Seeing you are dealing with long strings, you also need to say exactly how
long the one giving problems is. You also need to indicate whether shorter
strings work OK and how long they were.

Regarding your 99.9% question. I doubt that the location of the file is
affecting anything. Excel sometimes gets confused and doesn't provide the
help tips for no apparent reason. On the other hand, your .1% difference
might be causing it.

 
Didn't find what you were looking for? Find more on Why can't i use 'date' , 'now' etc in some computers? Or get search suggestion and latest updates.




Tagged: