Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Display the Browse for Folder Dialog

Hello,

I made a VBA EXCEL program which can open, write and close a file
(.xml), I would like to know how to do so when I click on a
"CommandButton", a window appears which display the brtowse for folder
dialog

Kinds regards.

For now :
Private Sub CreateFile(Line As String)
Dim FileName As String
Dim NewLine As String
Dim X As String, w As String, RulesInform As String

Rulename = TextBox11.Value

X = Rulename
w = ".xml"

RulesInform = X & w


FileName = "C:\Documents and Settings\q737318\Desktop\AuToRules
\RESULT1\" & RulesInform
Dim FileNum As Integer
FileNum = FreeFile
NewLine = ReplaceTag(Line)
Open FileName For Append As #FileNum ' creates the file if it
doesn't exist
Print #FileNum, NewLine ' write information at the end of the text
file
Close #FileNum ' close the file
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Display the Browse for Folder Dialog

Hi nic

use this code to see the folders browser window
and select the folder as per your need.

Application.FileDialog(msoFileDialogFolderPicker). InitialFileName = "C:
\" ' Give your own path"
Application.FileDialog(msoFileDialogFolderPicker). Show


On Jun 3, 2:21*pm, wrote:
Hello,

I made a VBA EXCEL program *which can open, write and close a file
(.xml), I would like to know how to do so when I click on a
"CommandButton", a window appears which display the brtowse for folder
dialog

Kinds regards.

For now :
Private Sub CreateFile(Line As String)
Dim FileName As String
Dim NewLine As String
Dim X As String, w As String, RulesInform As String

Rulename = TextBox11.Value

* * X = Rulename
* * w = ".xml"

* * RulesInform = X & w

FileName = "C:\Documents and Settings\q737318\Desktop\AuToRules
\RESULT1\" & RulesInform
Dim FileNum As Integer
* * FileNum = FreeFile
* * NewLine = ReplaceTag(Line)
* * Open FileName For Append As #FileNum ' creates the file if it
doesn't exist
* * Print #FileNum, NewLine ' write information at the end of the text
file
* * Close #FileNum ' close the file
End Sub


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Display the Browse for Folder Dialog

I'm sorry,
I used your code but it doesn't make a sense.
How to write it.


"Smart Akhtar" wrote in message
...
Hi nic

use this code to see the folders browser window
and select the folder as per your need.

Application.FileDialog(msoFileDialogFolderPicker). InitialFileName = "C:
\" ' Give your own path"
Application.FileDialog(msoFileDialogFolderPicker). Show


On Jun 3, 2:21 pm, wrote:
Hello,

I made a VBA EXCEL program which can open, write and close a file
(.xml), I would like to know how to do so when I click on a
"CommandButton", a window appears which display the brtowse for folder
dialog

Kinds regards.

For now :
Private Sub CreateFile(Line As String)
Dim FileName As String
Dim NewLine As String
Dim X As String, w As String, RulesInform As String

Rulename = TextBox11.Value

X = Rulename
w = ".xml"

RulesInform = X & w

FileName = "C:\Documents and Settings\q737318\Desktop\AuToRules
\RESULT1\" & RulesInform
Dim FileNum As Integer
FileNum = FreeFile
NewLine = ReplaceTag(Line)
Open FileName For Append As #FileNum ' creates the file if it
doesn't exist
Print #FileNum, NewLine ' write information at the end of the text
file
Close #FileNum ' close the file
End Sub




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Browse using MS Dialog Carlee Excel Programming 2 May 29th 07 06:09 AM
Browse for folder Steph[_6_] Excel Programming 1 December 8th 05 04:53 PM
Jim Rech's Browse for Folder Keb[_2_] Excel Programming 0 July 14th 04 02:53 PM
Browse for folder MD Excel Programming 1 July 13th 04 01:23 PM
Browse Dialog Box in VBA? Raul[_4_] Excel Programming 5 May 12th 04 03:29 PM


All times are GMT +1. The time now is 10:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"