Currently for my application, I am printing the output in a text file. My intention is when the user clicks on the print command button, it should open up Notepad with that particular text file. I tried the shell function, but that only opens up notepad. How do I open that particular text file. I suppose I have to do this with OLE. If anybody can help me out with this, I would really appreciate it.
You can use the following code to do this, just paste it into the code section of your form;
***Start Of Code***
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA"
Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.
What I'm presenting in this article is the result of 2 conditions in my work area:
We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code.