Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I create an Excel workbook?

Status
Not open for further replies.

dBjason

Programmer
Joined
Mar 25, 2005
Messages
355
Location
US

I need to prompt the user for a directory\filename then create a workbook and export worksheets to it, all from VBA. Does anyone know where I can find information on how to do this?

Thanks in advance,
Jason.
 

Did you try to search for an answer?

Try this link: thread707-1001653

If that doesn't help, you might provide a little more information: What languange/application are you trying to do this in/from? What have you tried so far?
 
Hi,

Code:
  dim wb as workbook

  Do
    fName = Application.GetSaveAsFilename
  Loop Until fName <> False

  set wb = workbooks.add
...
  wb.SaveAs Filename:=fName


Skip,

[glasses] [red]Be advised:[/red] When you ignite a firecracker in a bowl of vanilla, chocolate & strawberry ice cream, you get...
Neopolitan Blownapart! [tongue]


 
Thanks a million Skip! Muchos Kudos! I was actually considering doing an API call for the SaveAs dialog!!

Zathras -- if you read my post I think you'll find that I'm programming in VBA, and there's not many Microsoft applications that deal with workbooks and worksheets. And yes, coming here was part of my search for an answer. But thanks to you just the same.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top