Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am writing a VB macro for an excel spreadsheet. I want certain cells to
contain text and numbers when someone opens the workbook. Also I want a button to be shown when someone opens the workbook. I do not want to use a userform but I want the button and the text på be directly on the spreadsheet. I seem to fail with the workbook open sub. My code for this part is: Private Sub Workbook_Open() Worksheets("Setup").Range("b19") = "open" Worksheets("Setup").Range("b20") = "sesame" End Sub I do not know how to get this sub to perform the instructions. help!! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi April27,
Your code works for me, providing that it is placed in the workbook's ThisWorkbook module - not in a standard module. As for the button, although you do not say what the button is to do, why not insert the button manually? --- Regards, Norman "april27" wrote in message ... I am writing a VB macro for an excel spreadsheet. I want certain cells to contain text and numbers when someone opens the workbook. Also I want a button to be shown when someone opens the workbook. I do not want to use a userform but I want the button and the text på be directly on the spreadsheet. I seem to fail with the workbook open sub. My code for this part is: Private Sub Workbook_Open() Worksheets("Setup").Range("b19") = "open" Worksheets("Setup").Range("b20") = "sesame" End Sub I do not know how to get this sub to perform the instructions. help!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro that opens a window giving you info in a few cells | Excel Discussion (Misc queries) | |||
Can I add a pop-up message that will show when a workbook opens | Excel Discussion (Misc queries) | |||
how do I show file extensions when a workbook opens in excel 2003 | Excel Discussion (Misc queries) | |||
Excel file automatically opens - More Info | Excel Discussion (Misc queries) | |||
Personal workbook opens when Excel opens | Excel Discussion (Misc queries) |