ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Inserting Form form Visual Basic... (https://www.excelbanter.com/excel-programming/335470-inserting-form-form-visual-basic.html)

Thomas

Inserting Form form Visual Basic...
 
I am quite the begginer here. After I create a form in the Excel's Visual
Basic, how do I insert that form into a worksheet, or have it auto-execute
when workbook is opened.
Thank you,
Thomas

Norman Jones

Inserting Form form Visual Basic...
 
Hi Thomas,

In the ThisWorkbook module, try:

Sub Workbook_Open()

UserForm1.Show

End Sub

Where Userform1 is the name of your userform.


---
Regards,
Norman



"thomas" wrote in message
...
I am quite the begginer here. After I create a form in the Excel's Visual
Basic, how do I insert that form into a worksheet, or have it auto-execute
when workbook is opened.
Thank you,
Thomas




Tom Ogilvy

Inserting Form form Visual Basic...
 
Use the workbook_Open event to show the form

Private Sub Workbook_Open()
Userform1.Show
End Sub

this would go in the ThisWorkbook Module

See Chip Pearson's page on events

http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy

"thomas" wrote in message
...
I am quite the begginer here. After I create a form in the Excel's Visual
Basic, how do I insert that form into a worksheet, or have it auto-execute
when workbook is opened.
Thank you,
Thomas




Thomas

Inserting Form form Visual Basic...
 
Thank you

"Norman Jones" wrote:

Hi Thomas,

In the ThisWorkbook module, try:

Sub Workbook_Open()

UserForm1.Show

End Sub

Where Userform1 is the name of your userform.


---
Regards,
Norman



"thomas" wrote in message
...
I am quite the begginer here. After I create a form in the Excel's Visual
Basic, how do I insert that form into a worksheet, or have it auto-execute
when workbook is opened.
Thank you,
Thomas






All times are GMT +1. The time now is 04:44 AM.

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