Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Macro

This copies a sheet "02", renames and deletes the button

HTH


Sub CopyWs()
Sheets("02").Copy after:=Sheets(2)
Sheets("02 (2)").Select
Sheets("02 (2)").Name = "03"
ActiveSheet.Shapes("Button 1").Select
Selection.Cut

End Sub

"zephyr" wrote:

Macro as follows:

Range("E14").Select
Sheets("Sheet2").Select
Range("C38:C39").Select
Application.Run "Book1!Button1_Click"
ActiveSheet.Shapes("Button 1").Select
Range("D8").Select
ActiveSheet.Shapes("Button 1").Select
Application.Goto Reference:="Button1_Click"
End Sub

The macro only copies the worksheet but the debug error message come up when
I try to use it. Steps b) to d) cannot be recorded.

Many thanks for your assiatance

"Toppers" wrote:

Post the code.

"zephyr" wrote:

I have a workbook with two worksheets.

Worksheet 01 is the summary
Worksheet 02 is the form template.

I have a form button on Worksheet 02, I have tried to record a macro for the
button that does the following

a) copies the worksheet 02
b) re-names the worksheet as 03
c) places the worksheet after 02
d) removes the command button from the new worksheet 03.
e) When the contents of cell A1 & A2 are typed in on worksheet 03, the
contents also appear in the cells B1 and B2 on the summary Worksheet 01.

I want to use the workbook for multiple worksheets with the summary for each
one appearing on the summary Worksheet 01.

When I remove the command button from worksheet 03 a debug error message
comes up.

Your help is appreciated.

 
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
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 1 February 5th 07 09:31 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 3 February 5th 07 08:22 PM
using a cell value to control a counter inside a macro and displaying macro value ocset Excel Worksheet Functions 1 September 10th 06 05:32 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM


All times are GMT +1. The time now is 06:49 AM.

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"