Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Referencing Closed workbooks...Help!


Hi all...

I have a macro to archive some daily sales. What i want to do for th
procedure below is send the info to a closed workbook rather than th
active one. The reason for this is just to keep the active workboo
faster.

So if i wanted say, to append to Workbook "Archive", "Sheet1" which i
held in a folder called "Folder" in the C drive, how would i write th
reference?

Answers on a postcard.....

Thanks for help inadvance,

Chris

Dim SourceRange As Range, TargetRange As Range
Dim SearchRange As Range, LastWrittenCell As Range
Dim i, n As Integer, k As Integer, j As Integer, ItemToSearchFor
'--------------------------------------
' User definitions
n = 6 ' number of columns to append
Set SourceRange = [N2]
Set TargetRange = Range("BD!A1")
'--------------------------------------
Set SearchRange = Range(SourceRange, SourceRange.End(xlDown))
If IsEmpty(TargetRange) Then
Set LastWrittenCell = TargetRange
k = 0
Else
k =

--
chris10
-----------------------------------------------------------------------
chris100's Profile: http://www.excelforum.com/member.php...fo&userid=2516
View this thread: http://www.excelforum.com/showthread.php?threadid=50490

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Referencing Closed workbooks...Help!

Mr. Erlandsen's page (toward the bottom)

http://www.erlandsendata.no/english/...php?t=envbadac

also
http://support.microsoft.com/default...b;en-us;257819
How To Use ADO with Excel Data from Visual Basic or VBA

--
Regards,
Tom Ogilvy


"chris100" wrote in
message ...

Hi all...

I have a macro to archive some daily sales. What i want to do for the
procedure below is send the info to a closed workbook rather than the
active one. The reason for this is just to keep the active workbook
faster.

So if i wanted say, to append to Workbook "Archive", "Sheet1" which is
held in a folder called "Folder" in the C drive, how would i write the
reference?

Answers on a postcard.....

Thanks for help inadvance,

Chris

Dim SourceRange As Range, TargetRange As Range
Dim SearchRange As Range, LastWrittenCell As Range
Dim i, n As Integer, k As Integer, j As Integer, ItemToSearchFor
'--------------------------------------
' User definitions
n = 6 ' number of columns to append
Set SourceRange = [N2]
Set TargetRange = Range("BD!A1")
'--------------------------------------
Set SearchRange = Range(SourceRange, SourceRange.End(xlDown))
If IsEmpty(TargetRange) Then
Set LastWrittenCell = TargetRange
k = 0
Else
k = 1


--
chris100
------------------------------------------------------------------------
chris100's Profile:

http://www.excelforum.com/member.php...o&userid=25166
View this thread: http://www.excelforum.com/showthread...hreadid=504901



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default Referencing Closed workbooks...Help!

There is a good discurssion about this in Excel Daily Dose...

http://www.dicks-blog.com/archives/2...ing-workbooks/
--
HTH...

Jim Thomlinson


"chris100" wrote:


Hi all...

I have a macro to archive some daily sales. What i want to do for the
procedure below is send the info to a closed workbook rather than the
active one. The reason for this is just to keep the active workbook
faster.

So if i wanted say, to append to Workbook "Archive", "Sheet1" which is
held in a folder called "Folder" in the C drive, how would i write the
reference?

Answers on a postcard.....

Thanks for help inadvance,

Chris

Dim SourceRange As Range, TargetRange As Range
Dim SearchRange As Range, LastWrittenCell As Range
Dim i, n As Integer, k As Integer, j As Integer, ItemToSearchFor
'--------------------------------------
' User definitions
n = 6 ' number of columns to append
Set SourceRange = [N2]
Set TargetRange = Range("BD!A1")
'--------------------------------------
Set SearchRange = Range(SourceRange, SourceRange.End(xlDown))
If IsEmpty(TargetRange) Then
Set LastWrittenCell = TargetRange
k = 0
Else
k = 1


--
chris100
------------------------------------------------------------------------
chris100's Profile: http://www.excelforum.com/member.php...o&userid=25166
View this thread: http://www.excelforum.com/showthread...hreadid=504901


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
Referencing closed file TheErick Excel Worksheet Functions 6 January 22nd 09 12:32 AM
Referencing Data in Closed Workbooks Steve Excel Discussion (Misc queries) 4 October 26th 07 01:17 PM
Referencing cells in closed workbooks sastefan Excel Discussion (Misc queries) 1 March 1st 06 05:00 PM
Referencing a closed file briancrosier Excel Worksheet Functions 2 December 14th 04 04:11 PM
referencing a closed workbook buckyduke Excel Programming 1 June 28th 04 01:54 PM


All times are GMT +1. The time now is 06:54 AM.

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"