I already have a code from different forums - sample as below
1. Workbook (WB1) - w/Macro
2. Workbook (WB2) - save as from the first one + additional dynamic value/content
3. I have to capture screenshot from the WB2 (Sheet1) or Webpage and paste it in WB2 (Sheet2) - along with datetime stamp from taskbar
code below
Worrkbooks(WB2).WS("Sheet1").activate
setcursor x, y ''---- This line moves the cursor to the taskbar datetime as expected
Application.Wait(Now + Timevalue("0:00:03"))
Capture screenshot (using Keybd event)
Worrkbooks(WB2).WS("Sheet2").activate
Activesheet.paste
When I execute above code - it is not pasting the screenshot at the same time its not activating the sheet1 rather its going directly to Sheet2 with blank. Also its not storing in the clipboard.
When I put breakpoint on the line SetCursor, and try to execute the code it's working in the sense that it atleast activating the WB2.Sheet1 and storing the clipboard.
Kindly help on any tweaks to be done. Thanks in advance
1. Workbook (WB1) - w/Macro
2. Workbook (WB2) - save as from the first one + additional dynamic value/content
3. I have to capture screenshot from the WB2 (Sheet1) or Webpage and paste it in WB2 (Sheet2) - along with datetime stamp from taskbar
code below
Worrkbooks(WB2).WS("Sheet1").activate
setcursor x, y ''---- This line moves the cursor to the taskbar datetime as expected
Application.Wait(Now + Timevalue("0:00:03"))
Capture screenshot (using Keybd event)
Worrkbooks(WB2).WS("Sheet2").activate
Activesheet.paste
When I execute above code - it is not pasting the screenshot at the same time its not activating the sheet1 rather its going directly to Sheet2 with blank. Also its not storing in the clipboard.
When I put breakpoint on the line SetCursor, and try to execute the code it's working in the sense that it atleast activating the WB2.Sheet1 and storing the clipboard.
Kindly help on any tweaks to be done. Thanks in advance