Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Hide macros executions

Hello again

When I run this macro i can see every step is making.
Although i wrote application.screenupdating i can still see what macros do.
Can you pleaze tell what should i write in the macro code in order not to
see what's going on?

Thanks
Angeliki


Sub Clear()

Application.ScreenUpdating = False

Application.Run "'New Triangle Model_1j.xls'!Show_AllSheets_Click"
Sheets("Information").Select
Range("D1:D7").Select
Selection.ClearContents
Range("C10").Select
Selection.ClearContents
Range("E10").Select
Selection.ClearContents
Range("F10").Select
Selection.ClearContents
Cells(1, 1).Select
Sheets("Information").Visible = xlVeryHidden
Sheets("Exposure").Select
Range("C16:C25").Select
Selection.ClearContents
Range("F7:F26").Select
Selection.ClearContents
Cells(1, 1).Select
Sheets("Exposure").Visible = xlVeryHidden
Sheets("Losses Paid").Select
Range("A7").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Cells(1, 1).Select
Sheets("Losses Paid").Visible = xlVeryHidden
Sheets("Losses OS").Select
Range("C7").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Range("A8:B8").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Cells(1, 1).Select
Sheets("Losses OS").Visible = xlVeryHidden
Sheets("Losses Incurred").Select
Range("A8").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Cells(1, 1).Select
Sheets("Losses Incurred").Visible = xlVeryHidden
Application.Run "'New Triangle Model_1j.xls'!Hide_AllData_Click"
Sheets("Input").Select
Range("A1").Select

Application.ScreenUpdating = True

End Sub






  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Hide macros executions

Hi Angeliki,

My suspicion is that the macro "'New Triangle
Model_1j.xls'!Show_AllSheets_Click" that you run in the second line is
turning screen updating back on. Try setting screen updating to False before
and after the call to this macro. I've shown this in the example below,
along with some other tips on how to clean up your code.

Sub Clear()

Application.ScreenUpdating = False
'Application.Run "'New Triangle Model_1j.xls'!Show_AllSheets_Click"
Application.ScreenUpdating = False

With Worksheets("Information")
.Range("D1:D7").ClearContents
.Range("C10").ClearContents
.Range("E10").ClearContents
.Range("F10").ClearContents
.Visible = xlVeryHidden
End With
With Worksheets("Exposure")
Range("C16:C25").ClearContents
Range("F7:F26").ClearContents
.Visible = xlVeryHidden
End With
With Worksheets("Losses Paid")
.Range(.Range("A7"),
..Range("A7").End(xlToRight).End(xlDown)).ClearCon tents
.Visible = xlVeryHidden
End With
With Worksheets("Losses OS")
.Range(.Range("C7"),
..Range("C7").End(xlToRight).End(xlDown)).ClearCon tents
.Select
.Range(.Range("A8:B8"), .Range("A8:B8").End(xlDown)).ClearContents
.Visible = xlVeryHidden
End With
With Worksheets("Losses Incurred")
.Range(.Range("A8"),
..Range("A8").End(xlToRight).End(xlDown)).ClearCon tents
.Visible = xlVeryHidden
End With

Application.Run "'New Triangle Model_1j.xls'!Hide_AllData_Click"
Application.ScreenUpdating = False

Worksheets("Input").Select
Range("A1").Select
Application.ScreenUpdating = True

End Sub

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"Angeliki" wrote in message
...
Hello again

When I run this macro i can see every step is making.
Although i wrote application.screenupdating i can still see what macros

do.
Can you pleaze tell what should i write in the macro code in order not to
see what's going on?

Thanks
Angeliki


Sub Clear()

Application.ScreenUpdating = False

Application.Run "'New Triangle Model_1j.xls'!Show_AllSheets_Click"
Sheets("Information").Select
Range("D1:D7").Select
Selection.ClearContents
Range("C10").Select
Selection.ClearContents
Range("E10").Select
Selection.ClearContents
Range("F10").Select
Selection.ClearContents
Cells(1, 1).Select
Sheets("Information").Visible = xlVeryHidden
Sheets("Exposure").Select
Range("C16:C25").Select
Selection.ClearContents
Range("F7:F26").Select
Selection.ClearContents
Cells(1, 1).Select
Sheets("Exposure").Visible = xlVeryHidden
Sheets("Losses Paid").Select
Range("A7").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Cells(1, 1).Select
Sheets("Losses Paid").Visible = xlVeryHidden
Sheets("Losses OS").Select
Range("C7").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Range("A8:B8").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Cells(1, 1).Select
Sheets("Losses OS").Visible = xlVeryHidden
Sheets("Losses Incurred").Select
Range("A8").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Cells(1, 1).Select
Sheets("Losses Incurred").Visible = xlVeryHidden
Application.Run "'New Triangle Model_1j.xls'!Hide_AllData_Click"
Sheets("Input").Select
Range("A1").Select

Application.ScreenUpdating = True

End Sub








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
Macros - Unhide and hide minka Excel Discussion (Misc queries) 2 October 22nd 06 12:25 AM
Hide macros executions Angeliki Excel Programming 1 November 25th 03 04:31 PM
Hide macros executions Angeliki Excel Programming 1 November 25th 03 03:59 PM
How can you hide the macros ? Josee Lapointe Excel Programming 1 November 17th 03 05:47 PM
Hide Macros from Users Larry Graff Excel Programming 2 September 10th 03 05:41 PM


All times are GMT +1. The time now is 02:34 AM.

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

About Us

"It's about Microsoft Excel"