Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running sheet from another sheet ... and back
Przemek,
Private Sub CloseButton_Click() ActiveWorkbook.Save ' saving myfile.xls Unload WprowadzDaneFaktury Workbooks("first.xls").Sheets("Startform").activat e End Sub To show a form when a worksheet is activated In the worksheet code put Private Sub Worksheet_Activate() myform.show End Sub If you size your form full screen, the worksheet will be hidden behind it. To show a form when the workbook is opened Insert a module and put the following code into it: Private Sub Auto_Open() myform.show End Sub HTH Henry "Przemek Wrzesinski" wrote in message ... Hi, I've got one sheet (let's call it first.xls) with userform, which runs other sheet: Private Sub RegisterButton_Click() Workbooks.Open Filename:= "myfile.xls" Unload Startform ' hiding first userform Windows("myfile.xls").Activate End Sub In the sheet myfile.xls I've got another userform (opens on loading), which helps input new data to the sheet. My problem is, that I don't know how to make macro, which could save & close myfile.xls and return user to my first.xls and run again Startform, smtg like this: Private Sub CloseButton_Click() ActiveWorkbook.Save ' saving myfile.xls Unload WprowadzDaneFaktury Worksheets(first.xls).Startform.Show ' it stops here :( End Sub BTW How to open sheet and showing only startform without sheet ? TIA Przemek -- mors(at)morsik(dot)net |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Back to Last Sheet? | Excel Discussion (Misc queries) | |||
how do i bring back excel sheet ? | Excel Worksheet Functions | |||
last sheet or go back | New Users to Excel | |||
How do I get the date entry bar back (at top of sheet)? | Excel Discussion (Misc queries) | |||
Can't get back to Sheet 1. Seems to be lost. Tried unhide, does n | Excel Worksheet Functions |