PC Review


Reply
Thread Tools Rate Thread

Date Format code with error now

 
 
Jennifer
Guest
Posts: n/a
 
      12th Dec 2007
I have a form that has the following code. It works on my computer but now
that i want to let someone else use this. When they run the form it gets
errors. I think she said syntax error. Is there anything i can do to fix this
problem without changing the form or the code? Something to update her
computer maybe? Thank you for all your help.
Private Sub txtDate_Enter()
txtDate.Value = Format(Me.txtDate, "")
End Sub
Private Sub txtFrt_Enter()
txtFrt.Value = Format(Me.txtFrt.Value, "")
End Sub

Private Sub txtFrt_Exit(ByVal cancel As MSForms.ReturnBoolean)
txtFrt.Value = Format(Me.txtFrt.Value, "$#,###,###.000")
End Sub

Private Sub txtPrice_Enter()
'Places currency formatting on price
txtPrice.Value = Format(Me.txtPrice.Value, "")
End Sub bn
--
Thank you,

Jennifer
 
Reply With Quote
 
 
 
 
sebastienm
Guest
Posts: n/a
 
      12th Dec 2007
Hi
The last row of code has extra text ' bn': End Sub bn
Would that be the issue or is it just a typo in this post?
Else:
Syntax errors are caught at design time (when Compiling) and the error
should be highlighted. Can you have your users go in the vba editor, run the
menu Debug > Compile and tell row(s) is highlighted? You may have to fix
multiple errors 1 at a time ie fix 1 error then re-compile to get next error
to fix, ...


--
Regards,
Sébastien
<http://www.ondemandanalysis.com>


"Jennifer" wrote:

> I have a form that has the following code. It works on my computer but now
> that i want to let someone else use this. When they run the form it gets
> errors. I think she said syntax error. Is there anything i can do to fix this
> problem without changing the form or the code? Something to update her
> computer maybe? Thank you for all your help.
> Private Sub txtDate_Enter()
> txtDate.Value = Format(Me.txtDate, "")
> End Sub
> Private Sub txtFrt_Enter()
> txtFrt.Value = Format(Me.txtFrt.Value, "")
> End Sub
>
> Private Sub txtFrt_Exit(ByVal cancel As MSForms.ReturnBoolean)
> txtFrt.Value = Format(Me.txtFrt.Value, "$#,###,###.000")
> End Sub
>
> Private Sub txtPrice_Enter()
> 'Places currency formatting on price
> txtPrice.Value = Format(Me.txtPrice.Value, "")
> End Sub bn
> --
> Thank you,
>
> Jennifer

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange? VBA code returns wrong date format (not a date) =?Utf-8?B?enp4eGNj?= Microsoft Excel Programming 8 12th Oct 2007 09:13 AM
Code Date Format Depending on Computer format =?Utf-8?B?TXlyaWFt?= Microsoft Excel Misc 0 17th Jul 2007 03:26 PM
Open form code to enter a date in short date format =?Utf-8?B?VGFuZHk=?= Microsoft Access Form Coding 5 5th Jul 2005 07:05 PM
code to convert date from TEXT format (03-02) to DATE format (200203) Gauthier Microsoft Excel Programming 0 22nd Sep 2004 03:26 PM
code pasting a date changes date format in current month only Edward Microsoft Excel Programming 0 10th May 2004 06:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:20 AM.