![]() |
Excel VBA question - showing userform when opening workbook
Hi,
I created a userform called "Choose". I need to show this userform when I open the workbook. How is the code to do that? I tried writting in "This Workbook" something like: Dim Choose As UserForm Private Sub Workbook_Open() Application.Choose_Open End Sub I also need to called another userform called "Import" when clickin cmdProceed in Choose UserForm, I've tried this: Private Sub cmdProceed_Click() If OptionImport.Value = True Then UserForm.Initialize (Importing) Else If OptionExport.Value = True Then UserForm.Open (Exporting) End If End If 'Unload me End Sub Thanks -- Message posted from http://www.ExcelForum.com |
Excel VBA question - showing userform when opening workbook
Hi,
I created a userform called "Choose". I need to show this userform when I open the workbook. How is the code to do that? I tried writting in "This Workbook" something like: Try with Private Sub Workbook_Open() Choose.Show End Sub I also need to called another userform called "Import" when clicking cmdProceed in Choose UserForm Thanks. Try Private Sub cmdProceed_Click() Import.Show End Sub if you just need to initialize it, as your code suggests, try with Load Import -- Regards, Juan Pablo González |
Excel VBA question - showing userform when opening workbook
You have the right idea about where to call the form, but the way to d
it is: Private Sub Workbook_Open() Choose.Show End Sub - Piku -- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 08:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com