Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Working within a workbook without activating it?


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Working within a workbook without activating it?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Working within a workbook without activating it?


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Working within a workbook without activating it?


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Working within a workbook without activating it? hyyfte[_9_] Excel Programming 1 September 20th 04 03:34 PM
opening or activating another workbook file Paul James[_4_] Excel Programming 8 January 2nd 04 12:37 AM
Open workbook without activating it Kelley[_2_] Excel Programming 3 October 29th 03 04:49 PM
Activating workbook with variable Name Mark Klaus Excel Programming 2 October 24th 03 10:41 PM
Activating a workbook help bmwmcrider Excel Programming 1 October 21st 03 01:48 PM


All times are GMT +1. The time now is 02:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"