![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Re: vbscript pause Hi ,I am trying to set a macro in Excel, when I do this, the macro runs fine, but it does everything so quickly, you cannot see what is going on. Is there a way that I can put a pause in there so that you can see each stage that the macro is going through? So what I want to do, is run the macro, and then after each End with or End sub i need to be able to put a pause in there. My code is: Private Sub Timer1_Timer() CurrentSecond = CurrentSecond + 2 If CurrentSecond = TimeLimit Then Timer1.Enabled = False End Sub Private Sub Form_Load() CurrentSecond = 0 TimeLimit = 1 End With With ActiveChart.PivotLayout.PivotTable.DataPivotField .Orientation = xlColumnField .Position = 1 End With With ActiveChart.PivotLayout.PivotTable.PivotFields("Club member") .Orientation = xlColumnField .Position = 1 End With End Sub Sub Macro4() ' ' Macro4 Macro ' Macro recorded 31/05/2008 by z ' ' With ActiveChart.PivotLayout.PivotTable.PivotFields("Club member") .Orientation = xlColumnField .Position = 1 End With With ActiveChart.PivotLayout.PivotTable.DataPivotField .Orientation = xlColumnField .Position = 1 End With With ActiveChart.PivotLayout.PivotTable.PivotFields("Customer type") .Orientation = xlColumnField .Position = 1 End With End Sub Thanks |
My System Specs![]() |
| | #2 (permalink) |
| | Re: vbscript pause "Chongy" <Chongy@xxxxxx> wrote in message news:8F97837B-1889-462F-AB59-7CD4DA5096F1@xxxxxx Quote: > > Hi ,I am trying to set a macro in Excel, when I do this, the macro runs > fine, but it does everything so quickly, you cannot see what is going on. > Is > there a way that I can put a pause in there so that you can see each stage > that the macro is going through? So what I want to do, is run the macro, > and > then after each End with or End sub i need to be able to put a pause in > there. > > My code is: > > > > Private Sub Timer1_Timer() > CurrentSecond = CurrentSecond + 2 > If CurrentSecond = TimeLimit Then > Timer1.Enabled = False > End Sub > Private Sub Form_Load() > CurrentSecond = 0 > TimeLimit = 1 > End With > With ActiveChart.PivotLayout.PivotTable.DataPivotField > .Orientation = xlColumnField > .Position = 1 > End With > With ActiveChart.PivotLayout.PivotTable.PivotFields("Club member") > .Orientation = xlColumnField > .Position = 1 > End With > End Sub > > > > Sub Macro4() > ' > ' Macro4 Macro > ' Macro recorded 31/05/2008 by z > ' > > ' > With ActiveChart.PivotLayout.PivotTable.PivotFields("Club member") > .Orientation = xlColumnField > .Position = 1 > End With > With ActiveChart.PivotLayout.PivotTable.DataPivotField > .Orientation = xlColumnField > .Position = 1 > End With > With ActiveChart.PivotLayout.PivotTable.PivotFields("Customer type") > .Orientation = xlColumnField > .Position = 1 > End With > End Sub > > > Thanks > - Open your macro for editing. - Click Help - In the search field, type "Pause" (without the double quotes) - Follow the suggestions |
My System Specs![]() |
| | #3 (permalink) |
| | Re: vbscript pause "Pegasus (MVP)" <I.can@xxxxxx> wrote in message news:uCe9TwvwIHA.1772@xxxxxx Quote: > > "Chongy" <Chongy@xxxxxx> wrote in message > news:8F97837B-1889-462F-AB59-7CD4DA5096F1@xxxxxx Quote: >> >> Hi ,I am trying to set a macro in Excel, when I do this, the macro runs >> fine, but it does everything so quickly, you cannot see what is going on. >> Is >> there a way that I can put a pause in there so that you can see each >> stage >> that the macro is going through? So what I want to do, is run the macro, >> and >> then after each End with or End sub i need to be able to put a pause in >> there. >> >> My code is: >> >> >> >> Private Sub Timer1_Timer() >> CurrentSecond = CurrentSecond + 2 >> If CurrentSecond = TimeLimit Then >> Timer1.Enabled = False >> End Sub >> Private Sub Form_Load() >> CurrentSecond = 0 >> TimeLimit = 1 >> End With >> With ActiveChart.PivotLayout.PivotTable.DataPivotField >> .Orientation = xlColumnField >> .Position = 1 >> End With >> With ActiveChart.PivotLayout.PivotTable.PivotFields("Club member") >> .Orientation = xlColumnField >> .Position = 1 >> End With >> End Sub >> >> >> >> Sub Macro4() >> ' >> ' Macro4 Macro >> ' Macro recorded 31/05/2008 by z >> ' >> >> ' >> With ActiveChart.PivotLayout.PivotTable.PivotFields("Club member") >> .Orientation = xlColumnField >> .Position = 1 >> End With >> With ActiveChart.PivotLayout.PivotTable.DataPivotField >> .Orientation = xlColumnField >> .Position = 1 >> End With >> With ActiveChart.PivotLayout.PivotTable.PivotFields("Customer type") >> .Orientation = xlColumnField >> .Position = 1 >> End With >> End Sub >> >> >> Thanks >> > Try this while in Excel: > - Open your macro for editing. > - Click Help > - In the search field, type "Pause" (without the double quotes) > - Follow the suggestions let it run and check for a variable status every second until the condition is true, then execute the next part of the code. |
My System Specs![]() |
| | #4 (permalink) |
| | Re: vbscript pause "hb21l6" <hb21l6@xxxxxx> wrote in message news:28076D8B-9D90-446E-A6C1-DFC60B2DE24A@xxxxxx Quote: > > "Pegasus (MVP)" <I.can@xxxxxx> wrote in message > news:uCe9TwvwIHA.1772@xxxxxx Quote: >> >> "Chongy" <Chongy@xxxxxx> wrote in message >> news:8F97837B-1889-462F-AB59-7CD4DA5096F1@xxxxxx Quote: >>> >>> Hi ,I am trying to set a macro in Excel, when I do this, the macro runs >>> fine, but it does everything so quickly, you cannot see what is going >>> on. Is >>> there a way that I can put a pause in there so that you can see each >>> stage >>> that the macro is going through? So what I want to do, is run the >>> macro, and >>> then after each End with or End sub i need to be able to put a pause in >>> there. >>> >>> My code is: >>> >>> >>> >>> Private Sub Timer1_Timer() >>> CurrentSecond = CurrentSecond + 2 >>> If CurrentSecond = TimeLimit Then >>> Timer1.Enabled = False >>> End Sub >>> Private Sub Form_Load() >>> CurrentSecond = 0 >>> TimeLimit = 1 >>> End With >>> With ActiveChart.PivotLayout.PivotTable.DataPivotField >>> .Orientation = xlColumnField >>> .Position = 1 >>> End With >>> With ActiveChart.PivotLayout.PivotTable.PivotFields("Club member") >>> .Orientation = xlColumnField >>> .Position = 1 >>> End With >>> End Sub >>> >>> >>> >>> Sub Macro4() >>> ' >>> ' Macro4 Macro >>> ' Macro recorded 31/05/2008 by z >>> ' >>> >>> ' >>> With ActiveChart.PivotLayout.PivotTable.PivotFields("Club member") >>> .Orientation = xlColumnField >>> .Position = 1 >>> End With >>> With ActiveChart.PivotLayout.PivotTable.DataPivotField >>> .Orientation = xlColumnField >>> .Position = 1 >>> End With >>> With ActiveChart.PivotLayout.PivotTable.PivotFields("Customer type") >>> .Orientation = xlColumnField >>> .Position = 1 >>> End With >>> End Sub >>> >>> >>> Thanks >>> >> Try this while in Excel: >> - Open your macro for editing. >> - Click Help >> - In the search field, type "Pause" (without the double quotes) >> - Follow the suggestions > I've never done it in Excel, but you need a timer. > let it run and check for a variable status every second until the > condition is true, then execute the next part of the code. in Excel too - it is fully explained in the Help file. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| How to do No hang up VBScript (nohup for VBScript) | VB Script | |||
| Vista x64 1.5 min pause during boot | General Discussion | |||
| Long pause on startup.. | Vista General | |||
| Why does my PC pause during Boot? | Vista General | |||
| PowerShell Equ of PAUSE | PowerShell | |||