how do I call specific worksheet

V

vbidiot

I have the following code but I'm having trouble pulling the specific
worksheet instead of the entire workbook. e.g I want to pull sheet 2
from the workbook.


Code:
--------------------
Sub DataAcquire2A()
Dim RngToCopy As Range
Dim wkbk As Workbook
Dim DestCell As Range
Dim myFileNames As Variant
Dim iCtr As Long
Dim testStr As String

Set DestCell = ThisWorkbook.Worksheets(1).Range("a1:J1")

myFileNames = Array("S:\LOOSELEAF UPDATES\LOOSELEAF FILER INPUT\LOOSELEAFFIX.XLS", _
"S:\LOOSELEAF UPDATES\LOOSELEAF FILER INPUT\LOOSELEAFFIX2.XLS")
 
B

Bob Phillips

Um, what are you trying to do, what works, what doesn't? etc., etc.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
V

vbidiot

There isn't a simple solution to pulling the sheet instead of the file
for the below code?? Don't I have to fit it into the array?


Code:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top