View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Andy Pope Andy Pope is offline
external usenet poster
 
Posts: 2,489
Default UserForm initialize

Do you write the Initialize routine?

It would appear you used Userform1 instead of just userform.

try this instead.

Private Sub UserForm_Initialize()
Set rngErrorMarginCell = Range("d5")
dblErrorMarginal = rngErrorMarginCell.Value
TextBox1.Text = dblErrorMarginal
End Sub

Cheers
Andy

Arne Hegefors wrote:
I have a userform that when i initialize it i want to show some numbers in a
textbox. However nothing is shown in the textbox. what am i doing wrong? pls
help me!

Private Sub UserForm1_Initialize()
Dim dblErrorMarginal As Double
set dblErrorMarginal = 0.01
UserForm1.TextBox1.text = dblErrorMarginal
End Sub


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info