Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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
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
problems defining a global variable filo666 Excel Programming 2 August 17th 05 10:26 PM
Problems using a variable as a Table_Array in VLOOKUP Jeff Lowenstein Excel Worksheet Functions 1 July 16th 05 02:12 AM
Problems Defining Object Variable in For Each Loop ExcelMonkey[_190_] Excel Programming 7 February 28th 05 10:46 PM
Problems usinga a variable in a worksheet function? Kobayashi[_54_] Excel Programming 1 November 11th 04 04:07 PM
Problems usinga a variable in a worksheet function? Kobayashi[_53_] Excel Programming 1 November 11th 04 03:42 PM


All times are GMT +1. The time now is 10:56 PM.

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"