Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 460
Default Changing Years

I built some forms in Excel 2007 and saved it compatible to 2003 on my
computer at home. When I loaded it onto our network drive at work where all
the computers have Excell 2003, some of my code didn't work. For example, I
had to change from
txtDate.Text = Format(txtDate.Text, "mmm dd, yyyy") to read
txtDate.Text = Format(txtDate.Text, "[$-409]d-mmm-yy;@")
Here 's my problem. The program works on 5 of 6 computers. On one computer
I get an error on this code...

Private Sub txtShiftTotal_Change()
txtShiftTotal.Text = Format(txtShiftTotal.Text, "$ ###,###")
End Sub

Why would 1 computer be different than the rest? Is there some add-in or
update I should be looking for?
Is there some other code I could use to format the text box to $ isth commas
and no decimals?

Thanks for any help or ideas.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Changing Years

txtDate.Text = Format(txtDate.Text, "mmm dd, yyyy")
or
txtDate.Text = Format$(txtDate.Text, "mmm dd, yyyy")
is the correct syntax for 2003 though I'd have a wrapperto trap potl errors..

If IsDate(txtDate.Text) Then
txtDate.Text = Format$(CDate(txtDate.Text), "mmm dd, yyyy")
End If

Nor do I see errors with txtShiftTotal code

I'm running just Excel 2003 sp3

sorry




"Doug" wrote:

I built some forms in Excel 2007 and saved it compatible to 2003 on my
computer at home. When I loaded it onto our network drive at work where all
the computers have Excell 2003, some of my code didn't work. For example, I
had to change from
txtDate.Text = Format(txtDate.Text, "mmm dd, yyyy") to read
txtDate.Text = Format(txtDate.Text, "[$-409]d-mmm-yy;@")
Here 's my problem. The program works on 5 of 6 computers. On one computer
I get an error on this code...

Private Sub txtShiftTotal_Change()
txtShiftTotal.Text = Format(txtShiftTotal.Text, "$ ###,###")
End Sub

Why would 1 computer be different than the rest? Is there some add-in or
update I should be looking for?
Is there some other code I could use to format the text box to $ isth commas
and no decimals?

Thanks for any help or ideas.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 460
Default Changing Years

Thanks for the help on the date format. What can I use for the $ (dollar)
format?

"Patrick Molloy" wrote:

txtDate.Text = Format(txtDate.Text, "mmm dd, yyyy")
or
txtDate.Text = Format$(txtDate.Text, "mmm dd, yyyy")
is the correct syntax for 2003 though I'd have a wrapperto trap potl errors..

If IsDate(txtDate.Text) Then
txtDate.Text = Format$(CDate(txtDate.Text), "mmm dd, yyyy")
End If

Nor do I see errors with txtShiftTotal code

I'm running just Excel 2003 sp3

sorry




"Doug" wrote:

I built some forms in Excel 2007 and saved it compatible to 2003 on my
computer at home. When I loaded it onto our network drive at work where all
the computers have Excell 2003, some of my code didn't work. For example, I
had to change from
txtDate.Text = Format(txtDate.Text, "mmm dd, yyyy") to read
txtDate.Text = Format(txtDate.Text, "[$-409]d-mmm-yy;@")
Here 's my problem. The program works on 5 of 6 computers. On one computer
I get an error on this code...

Private Sub txtShiftTotal_Change()
txtShiftTotal.Text = Format(txtShiftTotal.Text, "$ ###,###")
End Sub

Why would 1 computer be different than the rest? Is there some add-in or
update I should be looking for?
Is there some other code I could use to format the text box to $ isth commas
and no decimals?

Thanks for any help or ideas.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing worksheets to the next years dates R Heitzman Excel Discussion (Misc queries) 2 December 2nd 08 04:44 PM
changing dates and years with less keystrokes Dick C Excel Worksheet Functions 13 January 19th 08 11:50 PM
How do I subtract dates to get a number in years or years & month jude Excel Discussion (Misc queries) 2 August 25th 06 08:02 PM
Overlay 4 years of data as a line on 4 years of columns for several x category labels eMTee Charts and Charting in Excel 1 December 5th 05 12:32 PM
Changing dates entered in 2005 to previous years lucy Excel Worksheet Functions 8 August 27th 05 03:17 AM


All times are GMT +1. The time now is 04:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"