LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 371
Default RePost - Creating WBooks

Hi
I am still getting failure or error when trying to copy a wsheet into a
newly created wbook. The procedure is initiated from a cmdbutton on a
modeless form. Eventually it will become part of an add-in.
What am I doing wrong, can someone please assist.

T.I.A.

Geoff

This code fails because it only produces a 1 sheet wbook and my default 3.

Private Sub cmdExecute_Click()
If chkConfirm = True Then
cFilename = ThisWorkbook.Name
Workbooks(cFilename).Sheets(1).Copy
End If
End Sub

This adaptation from a recent Tom Ogilvy answer errors with 'Named argument
not found' at Destination, astrerisked.

Sub AddBooks()
Dim bkOld As Workbook, bkNew As Workbook, sh As Worksheet
Set bkOld = Workbooks("WBooks Test6.xls")
Set sh = bkOld.Worksheets(1)
Set bkNew = Workbooks.Add()
bkNew.SaveAs _
Filename:= _
"D:\Excel\AutoProcess\Test7 " & bkOld, _
FileFormat:=xlNormal, _
Password:="", _
WriteResPassword:="", _
ReadOnlyRecommended:=False, _
CreateBackup:=False
sh.Copy Destination:=bkNew.Worksheets(1).Range("A1") '''''' errors here
End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Had to repost it!!! Prashant Excel Discussion (Misc queries) 1 April 23rd 10 03:19 PM
Creating WBooks Geoff Excel Programming 5 June 9th 06 10:14 AM
show list of wbooks present into a dir sal21[_74_] Excel Programming 1 September 22nd 05 01:02 AM
Maybe a repost----Creating Summary Bob O Excel Programming 3 January 15th 04 03:54 AM
Creating a large number of charts automatically (repost) Alan[_14_] Excel Programming 5 September 21st 03 09:16 PM


All times are GMT +1. The time now is 06:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"