View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jason jason is offline
external usenet poster
 
Posts: 104
Default Passing ARGUMENTS between event procedures of a USERFORM

in a normal module I have:

Public Const instrAutofit As String _
= "This will add a control which will autofit the columns" _
& "and rows of the activesheest used range "

Public Const instrAutoSum As String _
= "This will add a control to the menu that appears when you right" _
& "click a cell on a worksheet.It will have the same functionality" _
& "as the usual Autosum control that is usually situated on the toolbar"

In a Userform module I have:

Option Explicit

Private Sub ChkAutofit_Click()
Call TextBox1_Change(instrAutofit)
End Sub

Private Sub ChkAutoSum_Click()
Call TextBox1_Change(instrAutoSum)
End Sub

Private Sub TextBox1_Change(xxx As String)
TextBox1 = xxx
End Sub

Why doesn't this work??
Should I be using different events?

Jason