View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
achidsey achidsey is offline
external usenet poster
 
Posts: 100
Default With, End with - workbook

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.xl s")

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

--
achidsey