pop up box?
Moderators: JRL, Dorian (MJT support)
pop up box?
Hi. When i open one of my macros i made, i want it to start by showing a box that says START and REG. The start button starts the macro, and the REG button goes to a website. IS this possible to do in ms? Ca someone make up a code to do that? THNX
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Hi,
Here's a simple macro that does just what you want:
//Simple dialog with Start and Reg buttons
Dialog>Selector
Caption=Selection
Top=218
Width=190
Left=132
Height=79
Button=Start,8,8,75,25,1
Button=Reg,88,8,75,25,2
EndDialog>Selector
//Show the dialog and determine which button pressed
Show>Selector,choice
If>choice=1,runmacro
If>choice=2,gowebsite
//Put your macro code in the following subroutine
SRT>runmacro
MessageModal>Your macro code goes here!
END>runmacro
//This subroutine opens a website
SRT>gowebsite
VBSTART
Sub OpenPage(URL)
Dim IE
Set IE = CreateObject("InternetExplorer.Application")
IE.visible = 1
IE.navigate URL
End Sub
VBEND
VBRun>OpenPage,http://www.mjtnet.com/
END>gowebsite
Hope this helps ...
Here's a simple macro that does just what you want:
//Simple dialog with Start and Reg buttons
Dialog>Selector
Caption=Selection
Top=218
Width=190
Left=132
Height=79
Button=Start,8,8,75,25,1
Button=Reg,88,8,75,25,2
EndDialog>Selector
//Show the dialog and determine which button pressed
Show>Selector,choice
If>choice=1,runmacro
If>choice=2,gowebsite
//Put your macro code in the following subroutine
SRT>runmacro
MessageModal>Your macro code goes here!
END>runmacro
//This subroutine opens a website
SRT>gowebsite
VBSTART
Sub OpenPage(URL)
Dim IE
Set IE = CreateObject("InternetExplorer.Application")
IE.visible = 1
IE.navigate URL
End Sub
VBEND
VBRun>OpenPage,http://www.mjtnet.com/
END>gowebsite
Hope this helps ...
MJT Net Support
[email protected]
[email protected]