View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
J.E. McGimpsey J.E. McGimpsey is offline
external usenet poster
 
Posts: 493
Default multiple selection

one way:

Dim myValue As Long
myValue = 2
Range("A1:A" & myValue & ",C1:C" & myValue).Select

(it's better not to use VBA keywords, like Value as variable names -
it can get very confusing)



In article ,
(Michalll) wrote:

Help me please,

I need make a multiple selection in VBA but vith variable.

My example which works:
range("A1:A2, C1:C2").select

I need something like:
value = 2
range("A1:A & value, C1:C & value").select

but it does not work, would you help me?

thanx

Michal