ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Starting a 'floating' form once a spreadsheet is open (https://www.excelbanter.com/excel-programming/360506-starting-floating-form-once-spreadsheet-open.html)

den1s

Starting a 'floating' form once a spreadsheet is open
 
Hi,

I have created a form which gives the user an option of selecting the
source file for generating a spreadsheet. The form was created in
Excel's VBA interface.

Is there anyway I can get the form to automatically appear as soon as
the excel spreadsheet is open? At the moment, the user needs to go into
the VBA interface select the form and click 'run' before the form
appears on the spreadsheet. I would like the form to simply appear as
soon as the spreadhseet is open.

- K


davesexcel[_104_]

Starting a 'floating' form once a spreadsheet is open
 

Private Sub Workbook_Open()
UserForm1.Show
End Sub
this goes into a workbook module

click on the xl icon beside the file menu
choose view codes
in the dropdown menu that reads general select workbook
enter the above code that shows the userform
if your userform is not called UserForm1
then enter the name of the userform you want to show at startup


--
davesexcel


------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=538715



All times are GMT +1. The time now is 06:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com