Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default show info when workbook opens

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default show info when workbook opens

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro that opens a window giving you info in a few cells One-Leg Excel Discussion (Misc queries) 3 February 21st 07 09:15 PM
Can I add a pop-up message that will show when a workbook opens Cruisin Lo Excel Discussion (Misc queries) 5 June 28th 06 07:17 PM
how do I show file extensions when a workbook opens in excel 2003 Luis Excel Discussion (Misc queries) 1 June 8th 06 11:39 AM
Excel file automatically opens - More Info Lost4Now Excel Discussion (Misc queries) 2 December 4th 05 11:01 PM
Personal workbook opens when Excel opens SheriTingle Excel Discussion (Misc queries) 2 March 30th 05 12:22 AM


All times are GMT +1. The time now is 08:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"