Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() That helps. Still trying to not have to activate a window every time want something done to another workbook. Any ideas -- hyyft ----------------------------------------------------------------------- hyyfte's Profile: http://www.excelforum.com/member.php...fo&userid=1318 View this thread: http://www.excelforum.com/showthread.php?threadid=26156 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hyyfte,
You rarely need to activate anything. That said, pasting links is one of those unfortunate VBA methods that requires that the destination workbook, sheet, and range be selected prior to the pasting. For example, instead of Windows("Package Tracking.xls").Activate Call Sheets(1).Select(True) r = 2 Do i = 2 Do Until IsEmpty(Cells(i, 1)) Range(Cells(i, 1), Cells(i, 15)).Select Selection.Copy Windows("Master.xls").Activate Cells(r, 1).Select ActiveSheet.Paste Link:=True Cells(r + 1, 1).Select You could use: Workbooks("Master.xls").Activate Worksheets(1).Activate With Workbooks("Package Tracking.xls").Worksheets(1) Range(.Cells(2, 1), .Cells(.Cells(65536, 1).End(xlUp).Row, 15)).Copy Cells(65536, 1).End(xlUp)(2).Select ActiveSheet.Paste Link:=True End With This activates the destination workbook and sheet once, then selects the destination cell prior to pasting the link. There is no need to switch back and forth. HTH, Bernie MS Excel MVP "hyyfte" wrote in message ... That helps. Still trying to not have to activate a window every time I want something done to another workbook. Any ideas? -- hyyfte ------------------------------------------------------------------------ hyyfte's Profile: http://www.excelforum.com/member.php...o&userid=13187 View this thread: http://www.excelforum.com/showthread...hreadid=261569 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() hyyfte wrote: *That helps. Still trying to not have to activate a window every time I want something done to another workbook. Any ideas? -- hyyfte ------------------------------------------------------------------------ hyyfte's Profile: http://www.mcse.ms/member.php?action...o&userid=13187 View this thread: http://www.mcse.ms/showthread.php?threadid=261569 * -- richardfisher ------------------------------------------------------------------------ Posted via http://www.mcse.ms ------------------------------------------------------------------------ View this thread: http://www.mcse.ms/message1078297.html |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() There must be a way to alter data in an open workbook without activating it. Just staying in the first workbook which remains activated.... Anyone that can help please email -- richardfisher ------------------------------------------------------------------------ Posted via http://www.mcse.ms ------------------------------------------------------------------------ View this thread: http://www.mcse.ms/message1078297.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Working within a workbook without activating it? | Excel Programming | |||
opening or activating another workbook file | Excel Programming | |||
Open workbook without activating it | Excel Programming | |||
Activating workbook with variable Name | Excel Programming | |||
Activating a workbook help | Excel Programming |