LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Calling my macro is only working if certain options are selected

On 29 Mar, 17:36, "John Coleman" wrote:
Hi

(code snipped)

addNewSub() should work the same no matter what button you clicked on
the message box - you make a copy of the current sheet, rename it,
clear and relabel as sheet 1 the original then hide the copy. (no?)
What do you mean when you say "it does nothing?" For debugging
purposes maybe comment out the lines

ActiveSheet.Visible = xlVeryHidden
ActiveWorkbook.Save

and run it. At the end of the run - just what (in the case you
selected no) is wrong with the active sheet? Was a copy in fact made?



Hi there I have worked it out - its because I put in an exit sub at
the end of this bit

Else
Range("D13") = Msg3
Range("E13") = "No"
Range("E13").Font.ColorIndex = 5
Columns("E").AutoFit
Range("D13:E13").BorderAround ColorIndex:=xlAutomatic,
Weight:=xlMedium
Range("D13:E13").Borders(xlInsideVertical).LineSty le =
xlContinuous
Exit Sub

I have put in the Call addNewSheet bit in just before the exit sub and
this works now.

Thanks a lot for you all your help.

Regards

Matt

 
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
Protect selected settings in 'options' John Excel Worksheet Functions 4 June 15th 09 07:48 AM
how do I display list options as different colour when selected? MarilynP Excel Worksheet Functions 2 March 8th 07 10:06 PM
Working with options from within Tools Options clears the Clipboar Peter Rooney Excel Programming 6 November 18th 05 04:49 PM
Calling in data from a selected cell Alan[_31_] Excel Programming 1 August 4th 05 05:41 PM
Calling another workbook not working malik641 Excel Worksheet Functions 2 June 24th 05 07:36 PM


All times are GMT +1. The time now is 07:01 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"