View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Zack Barresse[_3_] Zack Barresse[_3_] is offline
external usenet poster
 
Posts: 101
Default userform in an addin

Hello Shawn,

Having a variable not defined means you have Option Explicit set at the top
of the module for variable declaration. This is generally good practice.
It should highlight which variable it does not see has a Dim statement.
Depending on which variable is not Dim'ed and how you have it setup should
determine where the Dim statement needs to go. Generally, it's at the top
of a procedure. Example:

Dim strName as String
Dim ws As Worksheet
Dim wb As Workbook
Dim oObj As Object
Dim dStart As Date
Dim blnCreated As Boolean

HTH

--
Regards,
Zack Barresse, aka firefytr, (GT = TFS FF Zack)
To email, remove the NO SPAM. Please keep correspondence to the board, as
to benefit others.


"Shawn G." wrote in message
...
Can you have userforms in addins? If so how do you call them from a
workbook.

I have a button on the worksheet that executes

Private Sub cmdMain_Click()
'*** Shows the main menu ***

FormReleaseStartup.Show
End Sub

but errors with Variable Not Defined.
FormReleaseStartup is in the addin.

Any help would be great
Thanks,
Shawn