Hi.
I have the following code:
Option Compare Database
Public Declare Function ShellExecute Lib "Shell32.dll" Alias
"ShellExecuteA" _
(ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Integer) As Long
Private Sub Command86_Click()
r = ShellExecute(0, "open", "C:\Windows\System32\Notepad.exe", "",
"C:\", 1)
End Sub
When I click the button, I get the following error message:
"The expression On Open you entered as the event property settings
produced the following error: constants, fixed-lenght strings, arrays,
user defines types and Declare statments are not allowed as Public
members of object modules"
Can I have some help, please?
Thanks
H. Martins 2 1829
On Nov 12, 11:50 am, "H. Martins" <HJRMart...@gmail.comwrote:
Hi.
I have the following code:
Option Compare Database
Public Declare Function ShellExecute Lib "Shell32.dll" Alias
"ShellExecuteA" _
(ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Integer) As Long
Private Sub Command86_Click()
r = ShellExecute(0, "open", "C:\Windows\System32\Notepad.exe", "",
"C:\", 1)
End Sub
When I click the button, I get the following error message:
"The expression On Open you entered as the event property settings
produced the following error: constants, fixed-lenght strings, arrays,
user defines types and Declare statments are not allowed as Public
members of object modules"
Can I have some help, please?
Thanks
H. Martins
I highly suspect you are in the wrong newsgroup. The Access newsgroup
is at comp.databases.ms-access
Thanks,
Seth Rowe
H. Martins wrote:
Public Declare Function ShellExecute Lib "Shell32.dll" . . .
Private Sub Command86_Click()
r = ShellExecute(0, "open", "C:\Windows\System32\Notepad.exe", "",
"C:\", 1)
End Sub
"The expression On Open you entered as the event property settings
produced the following error: constants, fixed-lenght strings, arrays,
user defines types and Declare statments are not allowed as Public
members of object modules"
The last part is the important one ...
"... Declare statements are not allowed as Public members ..."
Make the "Declare Function" Private and you should be OK.
Private Declare Function ShellExecute Lib "Shell32.dll" . . .
HTH,
Phill W. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Wiktor Zychla |
last post by:
I have a problem I cannot solve.
My application hosts IE activex control. I follow the standard procedure: I
just aximp shdocvw.dll. Note that this gives you two files: axshdocvw.dll
and...
|
by: the_openFace |
last post by:
I'm trying to display the shell's property page for various files and I'm
using this code:
class Win32Shell {
// ... other stuff here
public static extern Int32 ShellExecute(
Int32 hwnd,...
|
by: the openBack |
last post by:
I'm trying to display the shell's property page for various files and I'm
using this code:
class Win32Shell {
// ... other stuff here
public static extern Int32 ShellExecute(
Int32 hwnd,...
|
by: David |
last post by:
We have an mfc application in which we use ShellExecute
to launch the browser with an initial web site.
{ShellExecute(
NULL, "open", "http://www.SomeWebSite.com", NULL, NULL,
SW_SHOWNORMAL ) } ...
|
by: fdmaxey |
last post by:
I currently start a target executable written in VB.Net from an
application that uses a C-script language.
I start the target executable using ShellExecute in the C-script. The
target runs fine...
|
by: Terry Olsen |
last post by:
When starting a process, what is the difference between using
ShellExecute or not using it?
I need to start IE when a link is clicked in my app. I want as little
impact to my app as possible....
|
by: devecibasi |
last post by:
Hi,
I am trying to use ShellExecute function to invoke the ax program.
The code below works perfect:
ShellExecute(0&, "open", "ax.exe", "C:\2runtemp2.run", "C:\axfolder", 5)
The code below...
|
by: =?Utf-8?B?aGtNaWNybw==?= |
last post by:
Having problems compiling the following code in C USING CL.EXE
// shell.c LANGUAGE = .NET 2003
#include <iostream.h>
#include <windows.h>
int main()
{
SHELLEXECUTE(NULL, "open",...
|
by: khokhar.hassan |
last post by:
i hava a VB application that is used to run different application by
using ShellExecute. These applications also includes Adode reader to
open .pdf files. The application is working fine with...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |