Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro acting wierd with Zip Codes

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:

<BCells(1,15) = "06555"</B

The end result is showing up as 6555 in Excel - how do I get it to
show 06555?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Macro acting wierd with Zip Codes

<BCells(1,15) = "'06555"</B

note added single quote.

--
Regards,
Tom Ogilvy


"Stick With Hair" wrote:

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:

<BCells(1,15) = "06555"</B

The end result is showing up as 6555 in Excel - how do I get it to
show 06555?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Macro acting wierd with Zip Codes

Another:

With activesheet.cells(1,15)
.numberformat = "@" 'text
.value = "06555"
End with

Stick With Hair wrote:

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:

<BCells(1,15) = "06555"</B

The end result is showing up as 6555 in Excel - how do I get it to
show 06555?


--

Dave Peterson
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
Need some macro codes zen65 Excel Discussion (Misc queries) 4 May 24th 07 06:15 PM
Macro acting on all Sheets Dave Birley Excel Programming 2 May 8th 07 01:17 PM
ListBox/ComboBox Acting as Macro/Hyperlink Tool Phil H[_2_] Excel Programming 12 March 31st 06 12:48 PM
Arrow Keys Acting Wierd pkbro Excel Discussion (Misc queries) 6 March 28th 06 05:52 PM
Macro (Codes) Bonbon[_2_] Excel Programming 4 February 24th 06 04:52 PM


All times are GMT +1. The time now is 06:48 PM.

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

About Us

"It's about Microsoft Excel"