- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Print screen using VBA in SAP
If you are using SendKeys then avoid using it. I had used it in the past project and it seems to be inconsistent and error-prone.
You can use the below snippet at the top of the module and call it wherever required.
Option Explicit Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal _bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long) Private Const KEYEVENTF_KEYUP = &H2 Private Const VK_SNAPSHOT = &H2C Private Const VK_MENU = &H12 Sub PrintScreen() keybd_event VK_SNAPSHOT, 1, 0, 0 End Sub
- Related Articles
- How to print to the Screen using Python?
- Error while using enter "!" on selection screen in SAP.
- How to simulate Print screen button using selenium webdriver in Java?
- Using VBA macro to call an ABAP code
- While changing Partner number, VBA code keeps running while interacting with SAP system
- Print shortest path to print a string on screen in C Program.
- Changing Parameters on the screen in SAP
- Controlling close events in SAP Business One Screen Painter
- Call screen on clicking the button in SAP ABAP
- Multiple ALV grids on a single screen in SAP ABAP
- Set different font families for screen and print with CSS
- Checking technical information associated with screen field in SAP without any documentation
- A VBA code to list all add-ins in Excel
- Writing at the end of report without clearing current screen in SAP ABAP
- How to clear screen using C#?

Advertisements