ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Radio Button Values (https://www.excelbanter.com/excel-programming/386451-radio-button-values.html)

Pasty

Radio Button Values
 
Hi there - this is part of a questionnaire for some reason even if PDA is
selected it gives the answer Laptop would anyone know why this is the case as
I have a different option form later on which works fine. The code is:

frmRadio1.Show
If frmRadio1.rdPDA = True Then
Range("D4") = "Question 1c. Please state whether the information is
held on a PDA or laptop"
Range("E4") = "PDA"
Range("E4").Font.ColorIndex = 5
Columns("E").AutoFit
frmRadio1.Hide
Else
Range("D4") = "Question 1c. Please state whether the information is
held on a PDA or laptop"
Range("E4") = "Laptop"
Range("E4").Font.ColorIndex = 5
Columns("E").AutoFit
frmRadio1.Hide
End If



Bob Phillips

Radio Button Values
 
If you unload the form, it will fail the test. Just hide it instead.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Pasty" wrote in message
...
Hi there - this is part of a questionnaire for some reason even if PDA is
selected it gives the answer Laptop would anyone know why this is the case
as
I have a different option form later on which works fine. The code is:

frmRadio1.Show
If frmRadio1.rdPDA = True Then
Range("D4") = "Question 1c. Please state whether the information is
held on a PDA or laptop"
Range("E4") = "PDA"
Range("E4").Font.ColorIndex = 5
Columns("E").AutoFit
frmRadio1.Hide
Else
Range("D4") = "Question 1c. Please state whether the information is
held on a PDA or laptop"
Range("E4") = "Laptop"
Range("E4").Font.ColorIndex = 5
Columns("E").AutoFit
frmRadio1.Hide
End If





Pasty

Radio Button Values
 
Hi,

I am hiding the form in the code, unless I am missing something - which
knowing me is very likely!

"Pasty" wrote:

Hi there - this is part of a questionnaire for some reason even if PDA is
selected it gives the answer Laptop would anyone know why this is the case as
I have a different option form later on which works fine. The code is:

frmRadio1.Show
If frmRadio1.rdPDA = True Then
Range("D4") = "Question 1c. Please state whether the information is
held on a PDA or laptop"
Range("E4") = "PDA"
Range("E4").Font.ColorIndex = 5
Columns("E").AutoFit
frmRadio1.Hide
Else
Range("D4") = "Question 1c. Please state whether the information is
held on a PDA or laptop"
Range("E4") = "Laptop"
Range("E4").Font.ColorIndex = 5
Columns("E").AutoFit
frmRadio1.Hide
End If



Pasty

Radio Button Values
 
Hi,

I am hiding it, unless I'm missing something - which knowing me is very
likely.

"Pasty" wrote:

Hi there - this is part of a questionnaire for some reason even if PDA is
selected it gives the answer Laptop would anyone know why this is the case as
I have a different option form later on which works fine. The code is:

frmRadio1.Show
If frmRadio1.rdPDA = True Then
Range("D4") = "Question 1c. Please state whether the information is
held on a PDA or laptop"
Range("E4") = "PDA"
Range("E4").Font.ColorIndex = 5
Columns("E").AutoFit
frmRadio1.Hide
Else
Range("D4") = "Question 1c. Please state whether the information is
held on a PDA or laptop"
Range("E4") = "Laptop"
Range("E4").Font.ColorIndex = 5
Columns("E").AutoFit
frmRadio1.Hide
End If



Pasty

Radio Button Values
 
Ignore that - you were right it was set as unload on the userform.

"Pasty" wrote:

Hi,

I am hiding the form in the code, unless I am missing something - which
knowing me is very likely!

"Pasty" wrote:

Hi there - this is part of a questionnaire for some reason even if PDA is
selected it gives the answer Laptop would anyone know why this is the case as
I have a different option form later on which works fine. The code is:

frmRadio1.Show
If frmRadio1.rdPDA = True Then
Range("D4") = "Question 1c. Please state whether the information is
held on a PDA or laptop"
Range("E4") = "PDA"
Range("E4").Font.ColorIndex = 5
Columns("E").AutoFit
frmRadio1.Hide
Else
Range("D4") = "Question 1c. Please state whether the information is
held on a PDA or laptop"
Range("E4") = "Laptop"
Range("E4").Font.ColorIndex = 5
Columns("E").AutoFit
frmRadio1.Hide
End If




All times are GMT +1. The time now is 05:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com