View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
oakman[_24_] oakman[_24_] is offline
external usenet poster
 
Posts: 1
Default For Each Loop not working properly


Hello Tom,

Thank you for still paying attention to my request for help. I have
entered the midified code. However, I get a different error for the
same line. I get error '9' "Subscript out of range". When I debug,
the line "Set sh = Worksheets(Unit.Offset(0, 1).Value)" is highlited in
yellow. I will be honest with you, I have no idea what this error
means. I REALLY wish that I could be more useful in to your effort to
help me. May I ask one question? Why is it that the macro assigns the
value to the "sh" variable the value of the data one column to the right
of the Unit names? Do you think this could be contributing to the line
of code being so problematic? Please disregard my ignorance if this
question is not relevant. I appreciate the fact that you have helped
me with every problem so far. Please accept my gratitude in your
effort to help me learn.


--
oakman
------------------------------------------------------------------------
oakman's Profile: http://www.excelforum.com/member.php...fo&userid=9172
View this thread: http://www.excelforum.com/showthread...hreadid=525659