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: 10
Default More Visual Basic Syntax

I need help figuring out the syntax for using the counter
from a 'For' loop in the cell references. I marked the
lines I have wrong w/ 'X'. Both errors involve passing
the value of 'counter' into a 'Range' statement to specify
the row number in a Cell designation.

Dim counter As Integer
Dim temp As String
For counter = 1 To 10
temp = Worksheets("Sheet1").Cells(counter, 1).Value
Select Case temp
Case apple
X Range("A'counter':H'counter'").Select
Selection.Copy
Sheets("Sheet2").Select
X Range("A'counter+43'").Select
ActiveSheet.Paste
Case ....
End Select
Next i

 
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
Is Visual Basic the same as Visual Studio 2008? Mike Stewart Excel Worksheet Functions 5 January 11th 09 04:58 PM
Visual Basic mcp201 Excel Discussion (Misc queries) 0 June 23rd 08 05:05 PM
Visual Basic Co-op 20 Excel Discussion (Misc queries) 2 June 28th 07 09:06 PM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM
Help: Visual Basic Syntax Al[_12_] Excel Programming 7 November 3rd 03 10:53 AM


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