Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Prevent Excel Running a Form on Auto Open

Status
Not open for further replies.

fiona108

Programmer
Jun 24, 2004
7
GB
Hi there

I've done something a bit silly. I am creating a spreadsheet for my users and open a switchboard form in the Auto Open event of the worksheet. The form has buttons to open other forms and close the spreadsheet as required. I have put in some code so the 'X' at the top right doesn't close the form, so I can run the code which is behind the close button and close down the form neatly. My problem is that I cannot now get to the code behind the form - I can only run the spreadsheet as a user as any attempt to close the form via the 'X' fails (exactly as I wanted) so the only way to close the form is via my button which closes the spreadsheet. If it was Access, I would open holding the shift key - how do I get behind the code in Excel? Sorry if this is a very simple question but it's causing me fustration.

Thanks and Regards
Fiona
 
Hi Skip

Thanks for the quick reply - am I supposed to be holding Alt and F11 as I open the spreadsheet - in this case I get the properties window but it doesn't open the spreadsheet. Alt + F11 seems to have no effect once I am in and the form is being displayed.

Thanks again
Fiona
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top