<userform name>.<checkbox name>.Value
'example If formHome.chkActiveOnly.Value = True Then MsgBox "User has checked the box" Else MsgBox "User has not checked the box" End If
<userform name>.<checkbox name>.Value
'example If formHome.chkActiveOnly.Value = True Then MsgBox "User has checked the box" Else MsgBox "User has not checked the box" End If
'to retrieve data Workbooks("<workbook file name>").Worksheets("<sheet name>").Range("<your range>").Value Workbooks("<workbook file name>").Worksheets("<sheet name>").Cells(<row number>, <column number>).Value 'to set data Workbooks("<workbook file name>").Workbooks("Worksheets("<sheet name>").Range("<your range>") = <your value/data> Workbooks("<workbook file name>").Worksheets("<sheet name>").Cells(<row number>, <column number>).Value = <your value/data>
'examples Workbooks("example.xlsm").Worksheets("Example").Range("A1:A4") = "hello" Workbooks("book3.xlsx").Worksheets("Example").Range("D1") = "world" Workbooks("book3.xlsx").Worksheets("Example").Cells(2, 4).Value = "goodbye"
'to retrieve data Worksheets("<sheet name>").Range("<your range>").Value Worksheets("<sheet name>").Cells(<row number>, <column number>).Value 'to set data Worksheets("<sheet name>").Range("<your range>") = <your value/data> Worksheets("<sheet name>").Cells(<row number>, <column number>).Value = <your value/data>
'examples Worksheets("Example").Range("A1:A4") = "hello" Worksheets("Example").Range("D1") = "world" Worksheets("Example").Cells(2, 4).Value = "goodbye"
Range(“<cell reference>”).Borders.LineStyle= <line style> Range(“<cell reference>”).Borders.Weight = <thickness style> Range(“<cell reference>”).Borders.Color= <rgb color>
‘examples Range(“B4”).Borders.LineStyle= xlDash Range(“B4”).Borders.Color= rgbBlueViolet
Range(“<your range>”).Copy Range(“<cell of paste location>”).PasteSpecial Paste:=<xlPasteValues, xlPasteFormats, or xlPasteFormulas>
‘examples Worksheets (“Sheet2”).Range(“A2:B2”).Copy Range(“C3:D3”).PasteSpecial Paste:=xlPasteValues ‘copies values of range A2:B2 from another worksheet
<radio button name>.Value = <true or false>
‘example If radioVegetarian.Value = true Then MsgBox(“Your dinner will be a salad”) End If