[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Problem with " Shell "

Posted on 2006-04-23
3
Medium Priority
?
212 Views
Last Modified: 2010-08-05
Hello everybody!...

Private Sub Label10_Click()
Shell "C:\Windows\HackingDigitalCrew\Security\FindNot.pbk", vbNormalFocus
End Sub


How can i fix this problem ? it is not working ... because its .pbk file i think .. please help me to resolve
0
Comment
Question by:KingSencat
3 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 16520415
Hi KingSencat,

What do you want to do?

Cheers!
0
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 2000 total points
ID: 16520427
Use the ShellExecute() API instead of Shell():

Option Explicit

Private 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 Long) As Long

Private Const SW_HIDEWINDOW = &H80
Private Const SW_SHOWNORMAL As Long = 1

Private Sub Label10_Click()
    ShellExecute Me.hwnd, "Open", "C:\Windows\HackingDigitalCrew\Security\FindNot.pbk", 0&, 0&, SW_SHOWNORMAL
End Sub
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 16520428
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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. This l…
Suggested Courses
Course of the Month19 days, 22 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question