LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Grd Grd is offline
external usenet poster
 
Posts: 118
Default Three lines of code that I can't understand

Hi,

I'm having trouble with my code. It works when I step through it but not
otherwise.
So I'm trouble shooting the references with Debug.Print.

Heres a couple of lines that I find inexplicable. They are right ontop of
each other as I've put them below:

Debug.Print "starting " & theStartingCell.Address
theStartingCell.Interior.Color = vbRed
Debug.Print "starting " & theStartingCell.Address

The results in the immediates window are "starting $A$5" for both
debug.print lines which is as expected.
However when running it it makes $a$6 red in colour. When stepping through
it makes $a$5 red in color.

How could the reference change from one line to another. The code is in a
module if thats pertinent.

I'm totally confused as to how this could be possible

Any guidance would be greatly appreciated

Thanks
Suzanne
 
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
Help to understand "IF" code nascarjc New Users to Excel 3 January 31st 06 06:16 PM
How to see how many lines of code ? SpookiePower Excel Programming 3 January 25th 06 03:01 AM
Help me understand this code Carrot Excel Discussion (Misc queries) 2 October 14th 05 06:07 AM
Code to write out all lines of code davidm Excel Programming 3 August 5th 05 04:26 AM
Lines fo code Neeraja[_2_] Excel Programming 2 October 16th 03 01:07 PM


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