cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to create a dialog for browse files

Former Member
0 Kudos

I'm trying to create a dialog in SBO2004 for browse files(VB.NET). The idea is when i click one button, the dialog appears and then i select a file and i get the path of the file and store it on a variable.

Has any example code for this(in VB.NET)?

Thank you!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Have you tried 'Search Forum'?

Check these threads

HTH Juha

Former Member
0 Kudos

The one and only way to do this is

dim FileDialog as CommonDialog

these may also help you:

ile Handling (Generic)

While VB is working on a better approach (FileSystemObject), the built-in file handling statements are still the only way to access data other than through the VB database capabilities. Your skills in this area can make or break your ability to work with various formats. The OPEN/CLOSE statements are critical to success, but the LOF, EOF, and LEN functions are used even more often! It's also a given that you'll use the DIR function regularly.

• Dir - Returns a filename that matches a pattern

o temp$ = Dir (".")

• CurDir - Returns the current directory

o temp$ = CurDir

• MkDir - Creates a directory

o mkdir ( "newdirectoryname" )

• ChDir - Changes the current directory to a new location

o chdir ( "newdirectoryname" )

• ChDrive - Changes the current drive

o ChDirve "A"

• RmDir - Removes the indicated directory

o rmdir ( "directoryname" )

• Freefile - Returns an unused file handle

o i = freefile

• Open - Opens a file for access, locking it from other applications

o open "filename" for input as #1

• Close - Closes a file so that other applications may access it

o close #1

• LOF - Returns the length of a file in bytes

o i = lof ( #1 )

• EOF - Returns a boolean value to indicate if the end of a file has been reached

o statusvariable = eof ( #1 )

• Name As - Renames a file

o name "filename1" as "filename2"

• Kill - Deletes a file

o kill "filename"

• Fileattr - Returns attribute information about a file

o i = int ( tempvariable )

• GetAttr - Returns attributes of a file or directory

o i = GetAttr("c:\windows\temp")

• SetAttr - Sets the attributes of a file

o SetAttr pathname, vbHidden

• Reset - Closes all disk files opened by the OPEN statement

o Reset

• FileDateTime - Returns data file was created or last edited

o FileDateTime ( filename )

• FileLen - Returns length of file in bytes

o FileLen ( filename )

• FileCopy - Copies a file to a new name

o FileCopy sourcefile, destinationfile

• Lock - Controls access to a part or all of a file opened by OPEN

o Lock #1

• UnLock - Restores access to a part or all of a file opended by OPEN

o UnLock #1

• Width # - Set the output line width used by the OPEN statement

o Width #2, 80