Excel VBA - User form caption problem

  • Thread starter Thread starter xlnoobie
  • Start date Start date
X

xlnoobie

Hello All,

I've got a multi page which contains several chkboxs on. When a use
clicks the submit button, the code will loop through the check box's
find out which ones have been checked and then populate a range wit
the caption of the checked box's.

Works greated, except for when it comes to a certain set of captions
All of the captions are in the form of 03A01, 03B02, etc.

However when it get's to 03E01 & 03E02 it the populated cells rea
3.00E+01 (& 02 respectivly). When I look at the "format cell" on th
actual worksheet it lists it as "scientific" instead of general as th
rest are. I've tried changing the formating back to general but when
run the form it changes back again.

Is "03E" a reserved notation or something?

It works fine with 03F, etc. just 03E doesn't work.

Sorry for the long post, just trying to give as much info. a
possible.

Thanks
 
Excel uses 'E' to indicate scientific notation, so 3E02 is
interpreted as shorthand for 3*10^2, which Excel displays as
3.00E+01. Format the cell as Text prior to writing the value to
the cell, or include an apostrophe in front of the number.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Thanks Chip,

I went a head and formatted the cells to "text" and it worked like
charm. Thanks for the lesson as well.

I just found this forum last night, and think it great!
 
Back
Top