View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
DaveO[_2_] DaveO[_2_] is offline
external usenet poster
 
Posts: 46
Default Textbox Formatting Trouble

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