Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
More variable problems
I know i have posted several threads on this question already but still can't seem to figure out what i need to do. What i'm trying to d is run a module and if there is certain criteria meet then run a optio box(User Form) then return to that module with the selected option a the choice made. How is this done? If code = "7" Or code = "34" Then UserForm1.show Else:Exit sub End If If OptionButton1 = True Then MyChoice = 2 ElseIf OptionButton2 = True Then MyChoice = 3 The code number is comming from a worksheet that the module i checking. I really can't do the checking for the code number an earlier in the module. Thanks for the responses on the earlier post. have 3 book on VBA and none of them explain how this is done -- Information Ho ----------------------------------------------------------------------- Information Hog's Profile: http://www.excelforum.com/member.php...fo&userid=2150 View this thread: http://www.excelforum.com/showthread.php?threadid=39871 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
More variable problems
Sample code:
Sub test() With Assistant.NewBalloon .Heading = "Regional Sales Data" .Text = "Select the region(s) you want to print." For i = 1 To 3 .CheckBoxes(i).Text = "Region " & i Next .Button = msoButtonSetOkCancel If .Show = msoBalloonButtonOK Then dataPrinted = 0 For i = 1 To 3 If .CheckBoxes(i).Checked = True Then ' Code to print region data. dataPrinted = dataPrinted + 1 MsgBox "Region " & i & " data printed." End If Next If dataPrinted = 0 Then MsgBox "No data printed." End If End With End Sub regards, mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
problems defining a global variable | Excel Programming | |||
Problems using a variable as a Table_Array in VLOOKUP | Excel Worksheet Functions | |||
Problems Defining Object Variable in For Each Loop | Excel Programming | |||
Problems usinga a variable in a worksheet function? | Excel Programming | |||
Problems usinga a variable in a worksheet function? | Excel Programming |