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: 42
Default problem selecting a range using variables

I'm trying to select a range with the use of variables rather than hard
inputs. I am getting an error that says "expected list seperator" when
I type the last line of code. Can you guys tell me why this code
doesnt work?

Private Sub stringtest()
Dim col_1 As Long
Dim col_2 As Long
Dim row_1 As String
Dim row_2 As String

col_1 = 1
col_2 = 2
row_1 = A
row_2 = B

Range(col_1&row_1&":"&col_2&row_2&).Select

End Sub

 
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
Selecting range problem dorre Excel Programming 2 March 26th 06 03:33 AM
Selecting Non-Consecutive Variables Colin Vicary Excel Discussion (Misc queries) 3 February 2nd 06 09:01 AM
VBA problem pulling data out of variant/range input variables [email protected] Excel Programming 2 April 6th 05 04:56 PM
Problem selecting a named range kkknie[_180_] Excel Programming 0 August 11th 04 08:30 PM
Problem selecting a range to print... usa1 Excel Programming 3 June 16th 04 01:07 AM


All times are GMT +1. The time now is 05:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"