LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Workbook_Open Question

I have the following sub that will shade every other row in
a spreadsheet. It works fine if I run it manually via
alt-F8
----------------------------------------------------------------

Sub ShadeEveryOtherRow()

Range("A2").EntireRow.Select
Do While ActiveCell.Value < ""
Selection.Interior.ColorIndex = 15
ActiveCell.Offset(2, 0).EntireRow.Select
Loop
End Sub
----------------------------------------------------------------

But if I try to have it run at open, it does nothing. I
have tried placing the code directly in workbook_open,
nothing happens. I have tried calling the sub in
workbook_open,

----------------------------------------------------------------

Private Sub Workbook_Open()
ShadeEveryOtherRow
End Sub
----------------------------------------------------------------

and that doesn't work either. What the heck is going on
here!?

Thanks,
gm


 
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 () Bill Martin Excel Discussion (Misc queries) 12 December 20th 05 05:37 PM
Workbook_Open() not running Udo Fingerhut Excel Programming 2 July 30th 04 12:46 PM
Workbook_Open Eric Marple Excel Programming 3 May 10th 04 01:24 AM
Help with Workbook_Open Ruan[_3_] Excel Programming 7 April 28th 04 07:52 AM
Workbook_Open event and combobox state storage question jw Excel Programming 0 October 23rd 03 12:44 AM


All times are GMT +1. The time now is 03:45 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"