With, End with - workbook

G

Guest

Excel Experts,

How do I specify a workbook name in an End ..End With statement?

The workbook is closed, and I want to add a new sheet to it.

My code, which isn't working, is:


With Workbooks("C:\ACDocs\Processes\Trading\MNCEntry.xls")

Sheets.Add After:=Worksheets("VLTrades")

Worksheets(Worksheets.Count).Name = "VLTotals"

End With


I get a "subscript out of range" message. What is my error?

Thanks in advance.
Alan
 
G

Guest

You have to open the workbook to add a sheet to it... I am affraid there is
no way around this one (to the best of my knowledge)...
 

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