I am trying to store the result from the below sql query - At the moment it writes to an Excel Sheet but I would prefer the information to be stored into variables "strFirstName" and "strSurname"

Can anyone help?

Sub SQL_Result()

Dim qt As QueryTable
Dim strFirstName As String
Dim strSurname As String

connstring = "ODBC;DRIVER=SQL Server;SERVER=it-staffrecords.hq.internal;Trusted_Connection=Yes;DATABASE=CMDB"

SQLSTRING = "SELECT StaffTable.staffnumber, StaffTable.PreferredFirstName, StaffTable.surname" & Chr(13) & "" & Chr(10) & "FROM CMDB.dbo.StaffTable StaffTable" & Chr(13) & "" & Chr(10) & "WHERE (StaffTable.staffnumber='999')"

With ActiveSheet.QueryTables.Add(Connection:=connstring, Destination:=Range("A1"), Sql:=SQLSTRING)
 .Refresh
End With

End Sub
Many thanks!