ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   DialogBox (https://www.excelbanter.com/excel-programming/277190-dialogbox.html)

Greg[_12_]

DialogBox
 
I would like to create my own UserForm with browse window.
How to do that?
I want to point(only, not open) at file in computer and then send its
path to program (as a string)
I dont know how to create my own userform with "browsing" window and
some more buttons to send this info further.
Thanks for help in advice.

Harald Staff[_5_]

DialogBox
 
Hi

Use something already built-in instead of creating a form:

Sub test()
Dim V
V = Application.GetOpenFilename
If V = False Then
MsgBox "chicken"
Else
MsgBox "Something with " & CStr(V)
End If
End Sub

--
HTH. Best wishes Harald
Excel MVP
Followup to newsgroup only please

"Greg" skrev i melding
om...
I would like to create my own UserForm with browse window.
How to do that?
I want to point(only, not open) at file in computer and then send its
path to program (as a string)
I dont know how to create my own userform with "browsing" window and
some more buttons to send this info further.
Thanks for help in advice.




Robin Hammond

DialogBox
 
Have a look at application.getopenfilename in the vb help.

simple use is

strFileName = Application.getopenfilename()

Robin Hammond
www.enhanceddatasystems.com
Check out our XspandXL add-in


"Greg" wrote in message
om...
I would like to create my own UserForm with browse window.
How to do that?
I want to point(only, not open) at file in computer and then send its
path to program (as a string)
I dont know how to create my own userform with "browsing" window and
some more buttons to send this info further.
Thanks for help in advice.





All times are GMT +1. The time now is 06:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com