Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default Workbook Open Event

User opens a workbook with a single sheet.
If I know the sheetname, how may I code:

If the activesheet's name is "abc" Then
in the workbook open event.

Regards


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.714 / Virus Database: 470 - Release Date: 02/07/2004


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Workbook Open Event


'Try Pasting this on the thisworkbook window in VBE

Private Sub Workbook_Open()

Dim lMsg As Long
Dim strSheet As String

strSheet = "Sheet1"

If ActiveSheet.Name = strSheet Then
lMsg = MsgBox("The Active Sheet is: " &
ActiveSheet.Name)
Else
lMsg = MsgBox("The Active Sheet is: " &
ActiveSheet.Name & Chr(10) & Chr(10) & "Not: " & strSheet)
End If

End Sub


-----Original Message-----
User opens a workbook with a single sheet.
If I know the sheetname, how may I code:

If the activesheet's name is "abc" Then
in the workbook open event.

Regards


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.714 / Virus Database: 470 - Release Date:

02/07/2004


.

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
Workbook open event Pawan Excel Worksheet Functions 7 August 26th 08 07:32 AM
Event: open workbook Jeff Excel Discussion (Misc queries) 1 September 28th 06 02:58 PM
Workbook Open event Todd Huttenstine Excel Programming 1 April 21st 04 07:06 PM
Workbook Open Event Paul D[_2_] Excel Programming 0 October 17th 03 02:39 AM
Workbook Open Event Dave Peterson[_3_] Excel Programming 0 October 17th 03 02:38 AM


All times are GMT +1. The time now is 06:19 PM.

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

About Us

"It's about Microsoft Excel"