Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default If Active Sheet on Opening is X then do Y

Hi, I'm having trouble with the below code. I want the open procedure
to exit the code if the active sheet on opening is "Option1" can
anyone help please??

Private Sub Workbook_Open()
Application.ScreenUpdating = False
If ActiveSheet.Name("Option1") Then
Exit Sub
End If
ActiveWorkbook.Sheets("Input").Activate
If Range("D30") < "" Then
ActiveWorkbook.Sheets("Default").Select
Exit Sub
End If
UserForm2.Show
Application.ScreenUpdating = True
End Sub

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
I need to sort an active sheet using the col of the active cell HamFlyer Excel Programming 3 June 6th 06 07:25 PM
Copy from active sheet and paste into new sheet using info from cell in active Ingve Excel Programming 3 January 23rd 06 09:57 PM
Active Cell when opening workbook mwclark0807 Excel Worksheet Functions 3 January 5th 06 04:38 AM
Opening and pasting in active workbook TR[_2_] Excel Programming 3 July 29th 04 02:16 PM
PERSONAL.xls is opening as active when Excel starts - why? TBA[_2_] Excel Programming 2 January 9th 04 08:32 PM


All times are GMT +1. The time now is 01:58 AM.

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"