Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default copy a worksheet to another xls file

I have made a macro using with a VB function which generates a new
worksheet. I want to copy the generated worksheet into a new xls-file which
I want to create by a dialog-save file. Can anyone give me some simple
example code?

Jac


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default copy a worksheet to another xls file

Jac,

Try something like the following:

Dim FName As Variant
ActiveSheet.Copy
FName = Application.GetSaveAsFilename(filefilter:="Excel
files (*.xls),*.xls")
If FName < False Then
ActiveWorkbook.SaveAs FName
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Jac" wrote in message
.. .
I have made a macro using with a VB function which generates a

new
worksheet. I want to copy the generated worksheet into a new

xls-file which
I want to create by a dialog-save file. Can anyone give me some

simple
example code?

Jac




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default copy a worksheet to another xls file

Thanks

"Chip Pearson" schreef in bericht
...
Jac,

Try something like the following:

Dim FName As Variant
ActiveSheet.Copy
FName = Application.GetSaveAsFilename(filefilter:="Excel
files (*.xls),*.xls")
If FName < False Then
ActiveWorkbook.SaveAs FName
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Jac" wrote in message
.. .
I have made a macro using with a VB function which generates a

new
worksheet. I want to copy the generated worksheet into a new

xls-file which
I want to create by a dialog-save file. Can anyone give me some

simple
example code?

Jac






Reply
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
Copy a worksheet from one file to another [email protected] Excel Discussion (Misc queries) 1 May 15th 08 03:48 AM
Copy worksheet from one file to another pokdbz Excel Discussion (Misc queries) 6 September 28th 07 09:23 PM
copy worksheet without reference to old .xls file royboy Excel Discussion (Misc queries) 5 March 9th 07 02:05 PM
copy part of a worksheet into a worksheet in the same file/keepi. JTB Excel Worksheet Functions 1 September 23rd 06 09:13 AM
How do I copy a worksheet from a workbook as csv file Husker87 Excel Discussion (Misc queries) 6 March 26th 05 09:41 AM


All times are GMT +1. The time now is 06:03 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"