VBA + Excel or Webpage Screenshot along with DateTime stamp from task bar

DDRO

New Member
Joined
Dec 13, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
  2. Web
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
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,223,888
Messages
6,175,207
Members
452,618
Latest member
Tam84

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