Can Anyone help me with this?
I am trying to use showdataform and sendkeys to conduct the following operation:
1. open the dataform
2. Press Alt-C to set the criteria
3. Press Alt-U to enter a name in fourth field
4. Automatically enter text "gentry" as a variable, mylastname, pulled from another sheet
5. Press Alt-N to find next
Here is my code I am using that doesnt seem to work:
Sub EnterGradesWith_Startingdata()
Dim mylastname
mylastname = Worksheets("studentdata").Cells(2, 4).Value
Sheets("data").ShowDataForm
SendKeys "%C"
SendKeys "%U" & mylastname & "%N"
End Sub
Bookmarks