Dear All,
I need help on saving a specific range as a picture. I found a code at https://stackoverflow.com/questions/38367064/operating-ms-paint-using-excel-vba but a line of code not working and no solution related to this found.
Sub Saving_Pic_of_a_Range()
Dim path As String
Dim MyAppID As Variant
Range("A1:B20").Select
Selection.Copy
path = "C:\Windows\system32\mspaint.exe"
MyAppID = Shell(path, 1)
AppActivate (MyAppID) 'Getting error at this line
Application.SendKeys "^v", True
Application.SendKeys "^s", True
End Sub
Thanks,
DJ
I need help on saving a specific range as a picture. I found a code at https://stackoverflow.com/questions/38367064/operating-ms-paint-using-excel-vba but a line of code not working and no solution related to this found.
Sub Saving_Pic_of_a_Range()
Dim path As String
Dim MyAppID As Variant
Range("A1:B20").Select
Selection.Copy
path = "C:\Windows\system32\mspaint.exe"
MyAppID = Shell(path, 1)
AppActivate (MyAppID) 'Getting error at this line
Application.SendKeys "^v", True
Application.SendKeys "^s", True
End Sub
Thanks,
DJ