View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
ETLahrs ETLahrs is offline
external usenet poster
 
Posts: 17
Default Textbox Formatting Trouble

Update:

I deleted every column after my data to the end of the spreadsheet, column
IV and then formatted my column as text and now it seems to work fine.
Thanks for the help.

"ETLahrs" wrote:

There seems to be something wrong with the formatting of the cells. I tried
changing the format of the cells to be text, but in the cell it entered with
the E+. Also, I have noticed that it is dropping the last number of the
account and replacing it with a zero. I tried deleting the column and then
inserting a new column (so that I didn't have the change the range in all my
code) and then formatting the cells, that didn't work either. I may have to
try assigning the account # to a different column, it's just very odd.

Thanks

"DaveO" wrote:

This is a little chunky but I got it to work.

I entered a long decimal string in a cell, preceded by an apostrophe
to prevent Excel form autoformatting into an E+ representation. (It
also works if the cell is formatted as Text and the numeric characters
entered with no apostrophe.) Then in a code window I declared a public
variable K as string, and wrote this code to assign the account number
to K and open a Userform:

Sub test()
Dim Z As Byte

K = ActiveCell.Value
UserForm1.Show

End Sub


The Userform_Activate code assigns the value of K to the textbox. Can
you use this?

Dave O
Eschew obfuscation