Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default How to create a new page with a button?

I would like to create a button by a visual basic code.
On my first sheet I have a button. If I click on this button a new page is
created. On this new page I would like to create a button with a macro code,
but I don't know how. So the button on sheet 2 has to be created by a macro
code behind the button on page 1. In summary, the macro behind the button on
sheet 1 has to include the creation of a new page with a button. Thanks for
helping!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default How to create a new page with a button?

I just recorded this.

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 8/21/2008 by Donald B. Guillett
'

'
Sheets.Add
ActiveSheet.Shapes.AddShape(msoShapeRectangle, 249#, 22.5, 47.25,
35.25). _
Select
Selection.OnAction = "Rectangle1_Click"
'OR
'Selection.OnAction = "Macro1"
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Ruben" wrote in message
...
I would like to create a button by a visual basic code.
On my first sheet I have a button. If I click on this button a new page is
created. On this new page I would like to create a button with a macro
code,
but I don't know how. So the button on sheet 2 has to be created by a
macro
code behind the button on page 1. In summary, the macro behind the button
on
sheet 1 has to include the creation of a new page with a button. Thanks
for
helping!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default How to create a new page with a button?

Thanks!!

"Don Guillett" wrote:

I just recorded this.

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 8/21/2008 by Donald B. Guillett
'

'
Sheets.Add
ActiveSheet.Shapes.AddShape(msoShapeRectangle, 249#, 22.5, 47.25,
35.25). _
Select
Selection.OnAction = "Rectangle1_Click"
'OR
'Selection.OnAction = "Macro1"
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Ruben" wrote in message
...
I would like to create a button by a visual basic code.
On my first sheet I have a button. If I click on this button a new page is
created. On this new page I would like to create a button with a macro
code,
but I don't know how. So the button on sheet 2 has to be created by a
macro
code behind the button on page 1. In summary, the macro behind the button
on
sheet 1 has to include the creation of a new page with a button. Thanks
for
helping!



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
Create a button stumakker Excel Discussion (Misc queries) 2 June 5th 07 12:11 PM
Where is interactive button for save as a Web Page JB Excel Discussion (Misc queries) 1 February 9th 07 07:39 PM
page forward button tootielm Excel Discussion (Misc queries) 1 October 11th 06 09:48 AM
Command button dissapearing down page Lynz Excel Discussion (Misc queries) 5 September 6th 06 08:25 AM
How to Create a Command Button Jason Excel Discussion (Misc queries) 1 October 12th 05 09:50 PM


All times are GMT +1. The time now is 11:54 PM.

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

About Us

"It's about Microsoft Excel"