Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default A value based on OptionButton selection

I have a Userform that has several fields that are then populated on various
cells. What I have a question about is I have 3 optionbuttons that I want to
tie to a specifc cell on another sheet.

Example, open Userform from Sheet 2, OptionButton1 is selected (True) then I
want "Denied" placed in a specific cell on Sheet 1.

My userforms work correctly with the exception of placing my comment when
the optionbutton is true.

Thank you in advance for your help.
--
Sony
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default A value based on OptionButton selection

in the control source property of the option button put in

sheet1!B9

as an example.

--
Regards,
Tom Ogilvy


"Sony" wrote:

I have a Userform that has several fields that are then populated on various
cells. What I have a question about is I have 3 optionbuttons that I want to
tie to a specifc cell on another sheet.

Example, open Userform from Sheet 2, OptionButton1 is selected (True) then I
want "Denied" placed in a specific cell on Sheet 1.

My userforms work correctly with the exception of placing my comment when
the optionbutton is true.

Thank you in advance for your help.
--
Sony

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default A value based on OptionButton selection

I want to do this based on other information, I will provide a sample of my
code that is tied to a command button. My UserForm contains this command
button, as well as a Textbox & an OptionButton.

Private Sub CommandButton1_Click()
Dim Msg, Style, Title, Response
Msg = "Request Denied"
Style = vbYesNo + vbCritical + vbSubReq
Title = "Request Denied"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
ActiveWorkbook.SendMail "), ("Request Denied")
MsgBox ("The Denied Notification has been sent")
Sheets("Request").Range("f7").Value = TextBox1

If OptionButton1.Value = "True" Then
Set C = Range("h16")
C.Sheet ("Request")
C.Value = "Denied"

Unload Me
End If
Else
MsgBox "Send operation aborted."
Unload Me
End If
End Sub




--
Sony


"Tom Ogilvy" wrote:

in the control source property of the option button put in

sheet1!B9

as an example.

--
Regards,
Tom Ogilvy


"Sony" wrote:

I have a Userform that has several fields that are then populated on various
cells. What I have a question about is I have 3 optionbuttons that I want to
tie to a specifc cell on another sheet.

Example, open Userform from Sheet 2, OptionButton1 is selected (True) then I
want "Denied" placed in a specific cell on Sheet 1.

My userforms work correctly with the exception of placing my comment when
the optionbutton is true.

Thank you in advance for your help.
--
Sony

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default A value based on OptionButton selection

the concept is the same - qualify your range reference. See example below.

Set C = WorkSheets("Somesheetname").Range("h16")


--
Regards,
Tom Ogilvy

"Sony" wrote:

I want to do this based on other information, I will provide a sample of my
code that is tied to a command button. My UserForm contains this command
button, as well as a Textbox & an OptionButton.

Private Sub CommandButton1_Click()
Dim Msg, Style, Title, Response
Msg = "Request Denied"
Style = vbYesNo + vbCritical + vbSubReq
Title = "Request Denied"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
ActiveWorkbook.SendMail "), ("Request Denied")
MsgBox ("The Denied Notification has been sent")
Sheets("Request").Range("f7").Value = TextBox1

If OptionButton1.Value = "True" Then
Set C = Range("h16")
C.Sheet ("Request")
C.Value = "Denied"

Unload Me
End If
Else
MsgBox "Send operation aborted."
Unload Me
End If
End Sub




--
Sony


"Tom Ogilvy" wrote:

in the control source property of the option button put in

sheet1!B9

as an example.

--
Regards,
Tom Ogilvy


"Sony" wrote:

I have a Userform that has several fields that are then populated on various
cells. What I have a question about is I have 3 optionbuttons that I want to
tie to a specifc cell on another sheet.

Example, open Userform from Sheet 2, OptionButton1 is selected (True) then I
want "Denied" placed in a specific cell on Sheet 1.

My userforms work correctly with the exception of placing my comment when
the optionbutton is true.

Thank you in advance for your help.
--
Sony

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
Evaluating Equations Based on Selection !! monir Excel Worksheet Functions 3 February 25th 08 10:49 PM
Prevent selection of cells, based on value of another? Stilla Excel Worksheet Functions 2 December 7th 05 05:41 PM
limit cell list selection based on the selection of another list lorraine Excel Worksheet Functions 2 December 14th 04 08:17 PM
Selection based result formula siweltj Excel Programming 3 October 13th 04 01:46 PM
OptionButton selection dilema Paul Excel Programming 1 August 24th 04 01:45 PM


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