Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I'm new to Excel but used Lotus 123 version 2 many more years ago than I would like to admit. Forgot most of what I knew about writing macros but do remember that macros could linked to a key or to the opening of the spreadsheet. I have just started to use macros with Excel (I'm at the recording stage, but going into the script to try to work out what it does) Can anyone help me with code to invoke the macro as soon as the worksheet is opened please. Please, please, please be gentle and explain it in simple terms as the brain runs a lot slower these days. Many thanks -- Smudge |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Within the Visual Basic Editor (Alt-F11), click on the ThisWorkbook an enter this into the main window: Private Sub Workbook_Open() MsgBox ("This Macro Run on Open") End Sub Close the Visual Basic Editor, Save the Worksheet, Close it and Open i -- Bearacad ----------------------------------------------------------------------- Bearacade's Profile: http://www.excelforum.com/member.php...fo&userid=3501 View this thread: http://www.excelforum.com/showthread.php?threadid=57056 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you, I wasn't expecting an answer so quickly. will give it a go and get
back to you. Many Many thanks -- Smudge "Bearacade" wrote: Within the Visual Basic Editor (Alt-F11), click on the ThisWorkbook and enter this into the main window: Private Sub Workbook_Open() MsgBox ("This Macro Run on Open") End Sub Close the Visual Basic Editor, Save the Worksheet, Close it and Open it -- Bearacade ------------------------------------------------------------------------ Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016 View this thread: http://www.excelforum.com/showthread...hreadid=570565 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Smudge, Bearcade's code works
-- Robert |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you both. As always so impressed that people give up their time and
knowledge so freely! -- Smudge "Robert" wrote: Smudge, Bearcade's code works -- Robert |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autorun Macro | Excel Discussion (Misc queries) | |||
MACRO AUTORUN | Excel Discussion (Misc queries) | |||
Excel Macro Issue Trying to autorun Macro Upon Opening Worksheet | Excel Programming | |||
Autorun a macro | Excel Programming | |||
Autorun a macro | Excel Programming |