Is it possible to have an auto open for a user form? I want my user form to open when I open my workbook, without the worksheets showing. Is that possible?
Thanks,
Discovery
Is it possible to have an auto open for a user form? I want my user form to open when I open my workbook, without the worksheets showing. Is that possible?
Thanks,
Discovery
I think the only way is to make particular workbook hidden (Window - Hide) and insert into the module code similar to this:
Sub auto_open()
UserForm1.Show (1)
End Sub
Save it then and it should work.
mlhos
In your workbook autoopen (or open event), show your userform.
--
Regards,
Tom Ogilvy
"Discovery" <Discovery.1tewyc_1123448719.554@excelforum-nospam.com> wrote in
message news:Discovery.1tewyc_1123448719.554@excelforum-nospam.com...
>
> Is it possible to have an auto open for a user form? I want my user
> form to open when I open my workbook, without the worksheets showing.
> Is that possible?
>
> Thanks,
> Discovery
>
>
> --
> Discovery
> ------------------------------------------------------------------------
> Discovery's Profile:
http://www.excelforum.com/member.php...o&userid=25859
> View this thread: http://www.excelforum.com/showthread...hreadid=393707
>
On Sun, 7 Aug 2005 15:30:49 -0500, Discovery
<Discovery.1tewyc_1123448719.554@excelforum-nospam.com> wrote:
>
>Is it possible to have an auto open for a user form? I want my user
>form to open when I open my workbook, without the worksheets showing.
>Is that possible?
>
>Thanks,
>Discovery
AFAIAA there has to be at least one sheet open and visible.
Rgds
__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
Sub Workbook_Open()
UserForm1.Show
Application.Visible = False
End Sub
Be sure to reset the Visible property of the Application object to True when
you dismiss the UserForm.
--
Vasant
"Discovery" <Discovery.1tewyc_1123448719.554@excelforum-nospam.com> wrote in
message news:Discovery.1tewyc_1123448719.554@excelforum-nospam.com...
>
> Is it possible to have an auto open for a user form? I want my user
> form to open when I open my workbook, without the worksheets showing.
> Is that possible?
>
> Thanks,
> Discovery
>
>
> --
> Discovery
> ------------------------------------------------------------------------
> Discovery's Profile:
> http://www.excelforum.com/member.php...o&userid=25859
> View this thread: http://www.excelforum.com/showthread...hreadid=393707
>
Private Sub Workbook_Open()
ActiveWindow.Visible = False
Userform1.Show
Windows(ThisWorkbook.Name).Visible = True
End Sub
'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code
The workbook will flash briefly though.
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Discovery" <Discovery.1tewyc_1123448719.554@excelforum-nospam.com> wrote in
message news:Discovery.1tewyc_1123448719.554@excelforum-nospam.com...
>
> Is it possible to have an auto open for a user form? I want my user
> form to open when I open my workbook, without the worksheets showing.
> Is that possible?
>
> Thanks,
> Discovery
>
>
> --
> Discovery
> ------------------------------------------------------------------------
> Discovery's Profile:
http://www.excelforum.com/member.php...o&userid=25859
> View this thread: http://www.excelforum.com/showthread...hreadid=393707
>
Thank you for all your help everyone.
Bob Phillips, your code worked the first time, but when I opened it up the second time, it said, "Run-time error '91': Object variable or With block variable not set" - any ideas what's happened?
Thanks,
Discovery
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks