Launch new excel workbook..vba

V

Vinay

Hi,
I have written one (Excel)VBA macro.This macro produces one toolbar button
in excel.On clikcing of this Excel I want to launch new Excel
workbook(basically want to generate new excel workbook).Plz suggest me how
to do it.

regs
vinay
 
T

Tushar Mehta

Turn on the macro recorder (Tools | Macro > Record new macro...),
create a new workbook, and turn off the recorder. XL will generate the
necessary code for you. Switch to the VBE, copy+paste this code into
whatever macro you have attached to the toolbar button.

If you haven't attached any such macro, set the OnAction property of
the button you've created to the name of the macro that contains the
code to create the new workbook.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 

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