command button on form to open sheets
Talking about a UserForm in VBA or a form that you just created in a
worksheet? By Sheet do you mean a worksheet within the current
workbook, or do you meen a separate workbook?
If a UserFrom:
Sheets("ThisSheet").Activate will activate the sheet called
"ThisSheet"
Workbooks.Open "C:\ThisWorkbook.xls" will open the workbook in the C:\
dirve called "ThisWorkbook".
If you are referring to a form on a worksheet, then the same code can
be applied. Just right click on the command button in your shet and
select Assign Macro.
gbpg wrote:
Can I simply use a hyperlink to open a sheet from a command button on a form?
I don't see how to do this? Is there any code out there to do this?
|