|
-
Oct 2nd, 2000, 07:57 PM
#1
I need to retrive the file name of the currrent open Workbook, and the
Current WorkSheets name for use in a string. I open the WorkBook with a
complete filename given by the user in a form.
Dim MP3Collection As String
Dim WishList As String
Set objXLApp = CreateObject("Excel.Application")
objXLApp.Visible = False
Application.ScreenUpdating = False
'Open MP3 Collection List
MP3Collection = txtWishList(1).Text
Workbooks.Open filename:=MP3Collection
So Now I need to know the filename only & the worksheet name only for use
in the following bits of code:
Worksheets("Mp3_Export").Range("C2:Finish").FillUp
ActiveCell.FormulaR1C1 = "=COUNTIF([Collection.xls]Mp3_Export!C[-1],RC[-
1])"
My code basically does this: Opens two Excel files specified by my user
on a form (therfore these names are not constant). THen the code
contacates columns A & B on both files & compares for duplicates.
So in order to loose the constants inmy test code above I need to
determine the filename & Worksheet name of the files they opened. My
current two strings used to open the files contain the FUll PAth Name of
each File.
THANKS
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|