Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2007

Tip: Looking for answers? Try searching our database.

Macro acting wierd with Zip Codes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stick With Hair - 13 Sep 2007 19:38 GMT
I'm trying to store zip codes in a spreadsheet but am getting issues
with items that start with a 0.

The code I am using is:

<B>Cells(1,15) = "06555"</B>

The end result is showing up as 6555 in Excel - how do I get it to
show 06555?
Tom Ogilvy - 13 Sep 2007 19:54 GMT
<B>Cells(1,15) = "'06555"</B>

note added single quote.

Signature

Regards,
Tom Ogilvy

> I'm trying to store zip codes in a spreadsheet but am getting issues
> with items that start with a 0.
[quoted text clipped - 5 lines]
> The end result is showing up as 6555 in Excel - how do I get it to
> show 06555?
Dave Peterson - 13 Sep 2007 20:19 GMT
Another:
 
  With activesheet.cells(1,15)
       .numberformat = "@" 'text
       .value = "06555"
  End with

> I'm trying to store zip codes in a spreadsheet but am getting issues
> with items that start with a 0.
[quoted text clipped - 5 lines]
> The end result is showing up as 6555 in Excel - how do I get it to
> show 06555?

Signature

Dave Peterson

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.