K keithb Aug 2, 2005 #1 How can I specify a range using Row and Col Index instead of 'A1' notation in VBA? Thanks, Keith
D Dave Peterson Aug 2, 2005 #2 dim myCell as range dim myRow as long dim myCol as long myrow = 33 mycol = 15 set mycell = activesheet.cells(myrow,mycol) or... dim myrng as range dim myRowS as long dim myColS as long dim myRowF as long dim myColS as long myrows = 33 mycols = 15 myrowf = 45 mycolf = 27 with activesheet set myrng = .range(.cells(myrows,mycols),.cells(myrowf,mycolf)) end with myRowS/F S=Start, f=Finish
dim myCell as range dim myRow as long dim myCol as long myrow = 33 mycol = 15 set mycell = activesheet.cells(myrow,mycol) or... dim myrng as range dim myRowS as long dim myColS as long dim myRowF as long dim myColS as long myrows = 33 mycols = 15 myrowf = 45 mycolf = 27 with activesheet set myrng = .range(.cells(myrows,mycols),.cells(myrowf,mycolf)) end with myRowS/F S=Start, f=Finish