Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Cindy Fisher   on Aug 16 In MS Office Category.

  
Question Answered By: Hayden Evans   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?

Share: 

 

This Question has 4 more answer(s). View Complete Question Thread

 
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: