![]() |
Help selecting a range in vba from userform inputs
I have already created the form and can make the inputs select a cell but i cannot seem to select a range. The user enters a row and i want to select that row from column b t column s. I am using Cells(orderlineBox.Value, 2).Activate to select the row and column 2 (B). How do i select the range?? Please help. -- grieves ----------------------------------------------------------------------- grievesy's Profile: http://www.excelforum.com/member.php...fo&userid=1012 View this thread: http://www.excelforum.com/showthread.php?threadid=53701 |
Help selecting a range in vba from userform inputs
Hi,
Why do you want to Select anything? No real need for it. But here is the syntax... Range("B" & orderlineBox.Value & ":S" & orderlineBox.Value).Activate ... or .. Range(Cells(orderlineBox.Value, 2), Cells(orderlineBox.Value, 19)).Activate HTH -- Regards, Zack Barresse, aka firefytr "grievesy" wrote in message ... I have already created the form and can make the inputs select a cell. but i cannot seem to select a range. The user enters a row and i want to select that row from column b to column s. I am using Cells(orderlineBox.Value, 2).Activate to select the row and column 2 (B). How do i select the range?? Please help.. -- grievesy ------------------------------------------------------------------------ grievesy's Profile: http://www.excelforum.com/member.php...o&userid=10120 View this thread: http://www.excelforum.com/showthread...hreadid=537011 |
Help selecting a range in vba from userform inputs
Thanks for your help.. I actually just used the following Cells(orderlineBox.Value, 2).Activate Selection.Resize(, 18).Select Cheers -- grievesy ------------------------------------------------------------------------ grievesy's Profile: http://www.excelforum.com/member.php...o&userid=10120 View this thread: http://www.excelforum.com/showthread...hreadid=537011 |
Help selecting a range in vba from userform inputs
Can you tell us what it is you are trying to do? There's little need - if
any - to Select anything in VBA. Generally and usually it's a waste of resources and only slows your operation down. -- Regards, Zack Barresse, aka firefytr "grievesy" wrote in message ... Thanks for your help.. I actually just used the following Cells(orderlineBox.Value, 2).Activate Selection.Resize(, 18).Select Cheers -- grievesy ------------------------------------------------------------------------ grievesy's Profile: http://www.excelforum.com/member.php...o&userid=10120 View this thread: http://www.excelforum.com/showthread...hreadid=537011 |
All times are GMT +1. The time now is 05:16 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com