PDA

View Full Version : Solved: VBA userform



anandbw82
09-26-2009, 02:41 AM
Hi All,

I have created on userform in VBA. I want it to be activated when i open the workbook.
I mean whenever i open that workbook that form should appear.

Please give me the solution and i will give appreciation..

Thanks in advance

georgiboy
09-26-2009, 03:17 AM
In the ThisWorkbook window in the VBE paste this...

Private Sub Workbook_Open()

UserForm1.Show

End Sub

Assuming your userform is called UserForm1.

Hope this helps

anandbw82
09-26-2009, 03:21 AM
It works.

Thank you very much.

mdmackillop
09-26-2009, 05:19 AM
If you need to be able to work in the Spreadsheet with the form on the screen, then open it non-modal

.
UserForm1.Show False