Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
bob bob is offline
external usenet poster
 
Posts: 16
Default call procedure

my main macro starts with an input box and i want to bypass input box when
repeating macro1.
how would i goto a procedure in main macro. the following repeats 2 macros 1
every 10 min & 1 every 30 min.

if count 1 then i want to goto a procedure position in macro1 and bypass
an input box .
would the end sub in macro1 reset all parameters? i was wondering how to
keep the string value from input box in first cycle to use in repeat cycles.
is there an easier way to handle a repeat loop.

Sub refresh()
Static Counter As Integer
Static Count As Integer
Counter = Counter + 1
Count = Count + 1
' get data from web site #1
' if count is 1 goto repeat procedure in macro1 & not start of macro1

' start macro1
Windows("test.xls").Activate
Application.Run "'test.xls'!macro1"

If Counter = 3 Then
Counter = 0
' get data from web site #2
Windows("test.xls").Activate
Application.Run "'test.xls'!macro2"
End If
RunWhen = Now + TimeSerial(0, 10, 0)
Application.OnTime earliesttime:=RunWhen, _
procedu="refresh", schedule:=True

End Sub

thanks


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
call procedure problem stan Excel Discussion (Misc queries) 2 August 17th 09 06:11 PM
to call procedure in a worksheet in a module CAPTGNVR Excel Discussion (Misc queries) 4 January 30th 07 09:39 PM
Run-time error '5': Invalid Procedure Call or Argument Nikila Excel Discussion (Misc queries) 2 February 24th 06 09:26 PM
procedure won't call John Gittins Excel Programming 0 August 5th 03 08:17 PM
Run-time error '5':Invalid Procedure call or argument Jan Refsdal Excel Programming 1 July 25th 03 05:14 AM


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