Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default userform in an addin

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default userform in an addin

You can have them, but they would be fired up nmost easily from within the
addin. Ctreate a simple macro in teh addin to launch the form, then call
that macro from your button

Application.Run "myAddin.xla!LaunchForm"

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default userform in an addin

Oh, also, is the procedure located in the same project as the userform? I
was assuming so..


--
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Userform to enter values and shown in same userform in list helmekki[_104_] Excel Programming 0 November 19th 05 03:23 PM
Looping procedure calls userform; how to exit loop (via userform button)? KR Excel Programming 6 July 27th 05 12:57 PM
Activating userform and filling it with data form row where userform is activate Marthijn Beusekom via OfficeKB.com[_2_] Excel Programming 3 May 6th 05 05:44 PM
Remove Excel AddIn from AddIn List !! Help carl Excel Programming 2 December 8th 03 03:36 PM
Processing a UserForm from an AddIn altoonaPillarRock Excel Programming 0 November 5th 03 08:04 PM


All times are GMT +1. The time now is 11:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"