Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have a form that when opens has a button attached, tht when pressed executes a sub that makes changes on the frm. I would like to get rid of the button and have the sub auto execute when the form opens. ive tries linking the sub to form initilize but no joy any ideas -- ceemo ------------------------------------------------------------------------ ceemo's Profile: http://www.excelforum.com/member.php...o&userid=10650 View this thread: http://www.excelforum.com/showthread...hreadid=482433 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Ceemo,
Move the button code into the userform's initialze event, i.e.: Private Sub UserForm_Initialize() 'Your button code End Sub --- Regards, Norman "ceemo" wrote in message ... I have a form that when opens has a button attached, tht when pressed executes a sub that makes changes on the frm. I would like to get rid of the button and have the sub auto execute when the form opens. ive tries linking the sub to form initilize but no joy any ideas -- ceemo ------------------------------------------------------------------------ ceemo's Profile: http://www.excelforum.com/member.php...o&userid=10650 View this thread: http://www.excelforum.com/showthread...hreadid=482433 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sure!
When in the workbook do go here Visual Basics view project explorer this workbook 'now a code window is on the screen go to the down arrow in the box that reads (general) select workbook go to the next window to the right and select open ( you may already be on open) the code screen now reads: Private Sub Workbook_Open() 'your code(macro) goes in here End Sub have fun |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi DA,
I think that the OP refers to the form's initialisation, not the opening of the workbook: I would like to get rid of the button and have the sub auto execute when the form opens. --- Regards, Norman "damorrison" wrote in message oups.com... Sure! When in the workbook do go here Visual Basics view project explorer this workbook 'now a code window is on the screen go to the down arrow in the box that reads (general) select workbook go to the next window to the right and select open ( you may already be on open) the code screen now reads: Private Sub Workbook_Open() 'your code(macro) goes in here End Sub have fun |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() ive attached my book to help expain why i cant just paste the code tha the button is linked to into the initalise window using some progress code i found (you may reconise) im amending it so can run it without having to press the button on the form. so it wil just run when opened until 100% the auto clos -- ceem ----------------------------------------------------------------------- ceemo's Profile: http://www.excelforum.com/member.php...fo&userid=1065 View this thread: http://www.excelforum.com/showthread.php?threadid=48243 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Oh Yeh!
I better go to bed! |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() b**locks cant get it to attach oh well -- ceemo ------------------------------------------------------------------------ ceemo's Profile: http://www.excelforum.com/member.php...o&userid=10650 View this thread: http://www.excelforum.com/showthread...hreadid=482433 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
OT :Start your own online business today !start making dollars | Excel Discussion (Misc queries) | |||
How do I create a button on the toolbar that will start my form? | Excel Discussion (Misc queries) | |||
Start spreadsheet with WinXP start | Excel Worksheet Functions | |||
Form start position | Excel Programming | |||
can we start form by clicking hiperlink ? | Excel Programming |