Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 20th, 2006, 11:10 PM
Registered User
 
Join Date: Jan 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to sime_tyres
Default adding new worksheet using user form

i'm using microsoft excel2003
how am i going to adding new worksheet using button in user form..
for example..when i click button new record, it will automatically insert in new sheet..like each person has it's own sheet..
then..and all the data will insert in the new sheet..if the attribute are age,name and address.

 
Old February 21st, 2006, 12:35 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

I am sure someone else will have a better way of doing this, but whenever I run into a problem like this I have a little trick I use, that will probably help you...

Go to Tools, Macros, and then choose Record a New Macro. Once the Macro has started recording, make a note of what it calls the macro, then do the steps you would like to have the VBA module do. In this case, insert a new sheet, rename it and add some data. Then stop the recording.

Now goto the VBA editor, and view the last Module under the modules section. The new macro will be under here, and will show you the steps that you need to follow to duplicate this. Rewrite it, change what you need to, and then assign your button to use the new Macro.

Hope that helps,

Mike

Mike
EchoVue.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
First Post! adding an icon to a custom user form Banquo_ws Excel VBA 2 March 6th, 2007 04:36 AM
Adding Controls to User Control bmains C# 2005 0 June 5th, 2006 09:09 PM
adding new user to the database ali786 Classic ASP Databases 1 March 21st, 2005 01:34 AM
Problem with adding user to database ali786 Classic ASP Databases 3 March 11th, 2005 01:33 AM
Problem with adding user to dabase ali786 Classic ASP Databases 0 March 9th, 2005 06:34 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.