Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
different ways to copy a range?
Whats wrong with this syntax? WsName is a string variable that is assigned the name of a worksheet exists. n and i are both integer variables that are based off of For statements. Worksheets(WsName).Range(Cells(5, n), Cells(2415, n)).Copy _ Destination:=Worksheets("Summary").Cells(4, i) Thanks! -- botha822 ------------------------------------------------------------------------ botha822's Profile: http://www.excelforum.com/member.php...o&userid=36752 View this thread: http://www.excelforum.com/showthread...hreadid=569175 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
different ways to copy a range?
botha822 wrote: Whats wrong with this syntax? WsName is a string variable that is assigned the name of a worksheet exists. n and i are both integer variables that are based off of For statements. Worksheets(WsName).Range(Cells(5, n), Cells(2415, n)).Copy _ Destination:=Worksheets("Summary").Cells(4, i) Where is your code bugging? Are you sure your variables are being assigned? i think you should post all of your code AR |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
different ways to copy a range?
Cells use not the cells of the activesheet
Use it like this Worksheets(wsname).Range(Worksheets(wsname).Cells( 5, n), Worksheets(wsname).Cells(2415, n)).Copy _ Destination:=Worksheets("Summary").Cells(4, i) -- Regards Ron de Bruin http://www.rondebruin.nl "botha822" wrote in message ... Whats wrong with this syntax? WsName is a string variable that is assigned the name of a worksheet exists. n and i are both integer variables that are based off of For statements. Worksheets(WsName).Range(Cells(5, n), Cells(2415, n)).Copy _ Destination:=Worksheets("Summary").Cells(4, i) Thanks! -- botha822 ------------------------------------------------------------------------ botha822's Profile: http://www.excelforum.com/member.php...o&userid=36752 View this thread: http://www.excelforum.com/showthread...hreadid=569175 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
different ways to copy a range?
hey thanks for the advice guys. Both replies were useful in differen ways. Any other online resources for learning VBA for Excel? I know don't write very clean code and I would like to improve some more. Thanks again -- botha82 ----------------------------------------------------------------------- botha822's Profile: http://www.excelforum.com/member.php...fo&userid=3675 View this thread: http://www.excelforum.com/showthread.php?threadid=56917 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
different ways to copy a range?
David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm And he has links to lots of other sites. botha822 wrote: hey thanks for the advice guys. Both replies were useful in different ways. Any other online resources for learning VBA for Excel? I know I don't write very clean code and I would like to improve some more. Thanks again. -- botha822 ------------------------------------------------------------------------ botha822's Profile: http://www.excelforum.com/member.php...o&userid=36752 View this thread: http://www.excelforum.com/showthread...hreadid=569175 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
The error of my ways. | Excel Discussion (Misc queries) | |||
256 ways to make hamburger | Excel Worksheet Functions | |||
Alternative Ways to Spellcheck a Range | Excel Programming | |||
Ways of Summarising data | Excel Discussion (Misc queries) |