Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browse button in VB form

Status
Not open for further replies.

Vinay2479

Mechanical
Aug 16, 2007
18
IN
Hi all,

Does any one knows how to create a Browse button in VB form.
I want a browse button in my VB form. In the macro I want to select a folder by using the browse button as we do in windows explorer.

Vinay
 
Replies continue below

Recommended for you

It works in VBA. The "Declare" statements can not be in a form, though. They need to reside in a code module.
 
I tried to implement browseforfolder example with solidworks.
Its giving an error of a dll not found.

This is the part of code where its is giving error

Private Declare Function GetCurrentVbaProject _
Lib "vba332.dll" Alias "EbGetExecutingProj" _
(hProject As Long) As Long
Private Declare Function GetFuncID _
Lib "vba332.dll" Alias "TipGetFunctionId" _
(ByVal hProject As Long, ByVal strFunctionName As String, _
ByRef strFunctionId As String) As Long
Private Declare Function GetAddr _
Lib "vba332.dll" Alias "TipGetLpfnOfFunctionId" _
(ByVal hProject As Long, ByVal strFunctionId As String, _
ByRef lpfn As Long) As Long

Which dll name I have to specify for solidworks VBA to work?


Vinay



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top