I have a userform which will ask for a number that is then getting looked up in a spreadsheet, saving that range in a variable. When it's found the number, it will hide the first userform and bring up the second one, but in order for me to proceed with the update, I will need to use the same range that I've previously set against my variable in userform1, any idea how to do that? I have declared it as a Public variable but it still doesn't work. Code as it follows:

UserForm1:

```
Public FillRange As Range
Public BKref As Variant

Private Sub CommandButton1_Click()

On Error GoTo errhndlr:
    Set FillRange = Sheets("Loader").Cells.Find(TextRef.Value).Offset(0, 2)

BKref = TextRef.Value

If Not FillRange = "" Then
    UserForm1.Hide
    UserForm2.Show
    Exit Sub
ElseIf FillRange = "" Then
    MsgBox "Booking Reference cannot be empty!", vbCritical, "Error: No Booking Ref."
    UserForm1.Hide
    Exit Sub
Else
    MsgBox "Unexpected error, please re-start and try again. If you had this message more than 2 times, please update the line manually.", vbCritical, "Error"
    UserForm1.Hide
    Exit Sub
End If

Exit Sub

errhndlr:
MsgBox "Booking reference not found, please double-check that the booking reference you've entered is correct, alternatively update it manually.", vbCritical, "Error"
UserFrom1.Hide

End Sub

```

UserForm2: 

```
Private Sub CommandButton1_Click()

FillRange = TextPloaded.Value
FillRange.Offset(0, 2) = TextTime.Value
FillRange.Offset(0, 3) = TextLoader.Value

If Not TextComm.Value = "" Then
    FillRange.Offset(0, 4) = TextComm.Value
ElseIf TextComm.Value = "" Then
    FillRange.Offset(0, 4) = ""
End If

If Not FillRange = FillRange(0, -1) Then
    MsgBox "Actual and Planned pallets doesn't match, please highlight the diescrepancies on the assembly sheet!"
    BKref = FillRange.Offset(0, -2)
    Sheets("Assembly").Activate
    Sheets("Assembly").Rows(1).AutoFilter Field:=16, Criteria1:=BKref
    UserForm2.Hide
Else
    UserForm2.Hide
    UserForm1.Show
End If

End Sub

```