Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

userform in an addin

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shawn G. - 20 Jan 2006 16:07 GMT
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
Zack Barresse - 20 Jan 2006 16:21 GMT
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

Signature

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.

> Can you have userforms in addins? If so how do you call them from a
> workbook.
[quoted text clipped - 13 lines]
> Thanks,
> Shawn
Bob Phillips - 20 Jan 2006 16:32 GMT
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)

> Can you have userforms in addins? If so how do you call them from a workbook.
>
[quoted text clipped - 12 lines]
> Thanks,
> Shawn
Zack Barresse - 20 Jan 2006 17:02 GMT
Oh, also, is the procedure located in the same project as the userform?  I
was assuming so..

Signature

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.

> Can you have userforms in addins? If so how do you call them from a
> workbook.
[quoted text clipped - 13 lines]
> Thanks,
> Shawn
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.