Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Referencing Closed workbooks...Help!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
chris100 - 25 Jan 2006 14:11 GMT
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 =
Tom Ogilvy - 25 Jan 2006 14:21 GMT
Mr. Erlandsen's page (toward the bottom)

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

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

Signature

Regards,
Tom Ogilvy

> Hi all...
>
[quoted text clipped - 28 lines]
> Else
> k = 1
Jim Thomlinson - 25 Jan 2006 16:47 GMT
There is a good discurssion about this in Excel Daily Dose...

http://www.dicks-blog.com/archives/2006/01/24/different-approaches-to-retrieve-d
ata-from-underlying-workbooks/

Signature

HTH...

Jim Thomlinson

> Hi all...
>
[quoted text clipped - 28 lines]
> Else
> k = 1
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.