I'm trying to create a Macro to use sendkeys command to copy the value of a cell and paste on another application. It goes like this:

Abulean2010

New Member
Joined
Nov 28, 2021
Messages
8
Office Version
  1. 365
Platform
  1. Windows
VBA Code:
Sub CreatePDFFourms()
Dim PDFTemplateFile, NewPDFName, SavePDFFolder, LastName As String
Dim Year As Date
Dim CustRow, LastRow As Long
With Sheet32
LastRow = .Range("E9999").End(xlUp).Row
PDFTemplateFile = .Range("C3").Value
SavePDFFolder = .Range("C4").Value
ThisWorkbook.FollowHyperlink PDFTemplateFile
Application.Wait Now + 0.00006

For CustRow = 9 To 9
LastName = .Range("J" & CustRow).Value
Year = .Range("K" & CustRow).Value
Application.SendKeys "{Tab}", True
Application.SendKeys LastName, True
Application.Wait Now + 0.00001

Application.SendKeys "{Tab}", True
Application.SendKeys .Range("K" & CustRow).Value
Application.Wait Now + 0.00001
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Forum statistics

Threads
1,223,879
Messages
6,175,145
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top