I have some VBA code that is grabbing a value I have in a worksheet cell. Currently it looks like this:
:
Worksheets("Tank_GAP_Macro").Select
OptToggle = Range("f45")
If OptToggle = 1 Then
DoGAPFunc ("GAP.PREDDOSTEP(1)")
ElseIf OptToggle = 0 Then
DoGAPFunc ("GAP.PREDDOSTEP(0)")
End If
:
I want to get the value that resides in "f45" but I want to do this without having to select the worksheet. Is there a more efficient way to get the value in "f45" without have to use the .select command.
Thanks,
:
Worksheets("Tank_GAP_Macro").Select
OptToggle = Range("f45")
If OptToggle = 1 Then
DoGAPFunc ("GAP.PREDDOSTEP(1)")
ElseIf OptToggle = 0 Then
DoGAPFunc ("GAP.PREDDOSTEP(0)")
End If
:
I want to get the value that resides in "f45" but I want to do this without having to select the worksheet. Is there a more efficient way to get the value in "f45" without have to use the .select command.
Thanks,