View Full Version : Solved: Selection code is not accepted
Volvo850
09-01-2011, 03:22 AM
Does anyone know the right code for this
Selection?
If Sheets("smart7").Active And OptionButton2.Object = True And CheckBox1.Object = True Then
Sheets("Printliste").Range("D4").Value = ("Seglas dør kode A+B")
Bob Phillips
09-01-2011, 04:46 AM
If Activesheet.Name = "smart7" Then
If OptionButton2.Object And CheckBox1.Object Then
Worksheets("Printliste").Range("D4").Value = ("Seglas dør kode A+B")
End If
End If
visible2you
09-01-2011, 02:43 PM
If Activesheet.Name = "smart7" Then
If OptionButton2.Object And CheckBox1.Object Then
Worksheets("Printliste").Range("D4").Value = ("Seglas dør kode A+B")
End If
End If
XLD, you're Genius.
Volvo850
09-02-2011, 02:26 AM
Thanks XLD This works great.
I did modify the code a lit, becaus the first value Smart7 comes now from a combobox.
Thanks again for your support
Aussiebear
09-02-2011, 03:41 AM
Would you mind posting the modified code please?
Volvo850
09-02-2011, 04:26 AM
'Seglass selection smart7 ivm dør kode A+B
Select Case Cbomodnr1.Value
Case "7"
If OptionButton2.Object And CheckBox1.Object Then
If OptBtn13.Object Or OptBtn14.Object Or OptBtn15.Object Or OptBtn16.Object Then
Worksheets("Printliste").Range("D4").Value = ("Seglas dør kode A+B")
End If
End If
End Select
'Seglass selection smart8 ivm dør kode A+B
Select Case Cbomodnr1.Value
Case "8"
If OptionButton2.Object And CheckBox1.Object Then
If OptBtn13.Object Or OptBtn14.Object Or OptBtn15.Object Or OptBtn16.Object Then
Worksheets("Printliste").Range("D4").Value = ("Seglas dør kode A+B")
End If
End If
End Select
Would you mind posting the modified code please?
Bob Phillips
09-02-2011, 05:34 AM
You can simplify that
'Seglass selection smart7 ivm dør kode A+B
Select Case Cbomodnr1.Value
Case "7" , "8"
If OptionButton2.Object And CheckBox1.Object Then
If OptBtn13.Object Or OptBtn14.Object Or OptBtn15.Object Or OptBtn16.Object Then
Worksheets("Printliste").Range("D4").Value = ("Seglas dør kode A+B")
End If
End If
End Select
Volvo850
09-02-2011, 10:19 AM
You can simplify that
'Seglass selection smart7 ivm dør kode A+B
Select Case Cbomodnr1.Value
Case "7" , "8"
If OptionButton2.Object And CheckBox1.Object Then
If OptBtn13.Object Or OptBtn14.Object Or OptBtn15.Object Or OptBtn16.Object Then
Worksheets("Printliste").Range("D4").Value = ("Seglas dør kode A+B")
End If
End If
End Select
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.