Dialog To Select A Directory

Oct 17, 2008

Is there a dialog box like the one used in GetOpenFilename that can be used to select a directory?

I'm trying to select a directory/folder which will change each month but the macro selects the files from inside the folder once it's specified. I don't need the name of the current path; the path name needs to be able to be selected.

View 2 Replies


ADVERTISEMENT

Dialog Box For Selecting Directory/path

Jul 27, 2007

I've seen many posts advocating the use of BrowseFolder.zip located at
[url]

And some others saying to use the FileDialog object (if you use Excel 2002, or older(?))

I have to admit both are above my prior experience level, but I think I can do it if I understand what their function, requirements, and output are.

All I need is a dialog box that preferably lets me select the default directory, and then allows the user to select the target directory.

View 9 Replies View Related

Load Dialog Box In Last Directory Path Opened?

Jul 11, 2014

I have a file which is opened every so often. This file when opened it presents a userform in which you browse two files which then get loaded into the document and some charts/pivots are updated with the information from the loaded files.

When you click on the browse button it opens the browser dialog box in the libraries path. I am wondering if it's possible to have the dialog box open in the last directory path used.

For example:

A week ago I opened the file from the path C:UsersIntiDocumentsProjectsTea Project

What I would like to happen is that when I open the file today and I click the "Browse" button (which opens the dialog box to find files in your computer) for the dialog box to open automatically in the path C:UsersIntiDocumentsProjectsTea Project

Then if tomorrow the file is opened from the path C:UsersIntiPicturesProjectsTea2Project

Then a week from now when you browse for the file the dialog box opens automatically in the C:UsersIntiPicturesProjectsTea2Project path

This is what I have right now and it always opens the dialog box on C:UsersIntiDocuments

[Code] .....

View 1 Replies View Related

Dialog Box To Select Folder Only

Sep 1, 2008

I have code below which brings up a dialogue box and allows me to sect an excel file. Is there a way to change this code so the dialogue box will ask me to select a folder instead? I want to be able to select a folder and the rest of the code will open the files in the folder.

Sub Euro()
Dim wb1 As Workbook
Dim sFileName1 As String
myMsg = "Please Select Euromcontact Value File"
Response = MsgBox(myMsg, vbExclamation + vbOKOnly, myTitle)
sFileName1 = Application. GetOpenFilename
If sFileName1 = "False" Then Exit Sub
Set wb1 = Workbooks.Open(Filename:=sFileName1)
With wb1
.Activate
End With
End Sub

View 8 Replies View Related

Dialog Box To Select Sheet To Delete

Oct 29, 2012

I am trying to set a macro that will delete a sheet which the spreadsheet user types the name of the sheet into a dialog box rather than go to the actual sheet and delete the sheet.

View 3 Replies View Related

Select Worksheets Dialog Box - How To Change Code From Print To Send To Email

Sep 29, 2012

I am making custom time sheets to suit our agriculture business - these excel sheets get sent out to the different farm managers who send back in staff times.

This code below is brilliant and works perfect for our needs. However I need to be able to emailPDF the sheets not print.How / where do I change code so the selected sheets go to Save & Send via email as a PDF instead of going straight to the default printer .( hard copy )

VB:
Option Explicit
Sub SelectSheets()
Dim i As Integer
Dim TopPos As Integer
Dim SheetCount As Integer
Dim PrintDlg As DialogSheet

[Code] .....

View 5 Replies View Related

List All Files From Directory And Sub Directory?

Sep 5, 2013

The script collects all the files in directory and sub-directories and list them in ascending format, I want them to get in transpose format. like for example: Root folder has many sub directories and in them a sub directory XYZ has 5 excel files, it will get the sub directory name in Col A and transpose all .xls files.

Col A | Col B________|Col C_________ |Col D___________|Col E________|
XYZ__|C:/root/test.xls|C:/root/Sales.xls |C:/root/Report.xls |C:/root/sam.xls|

[URL]

View 8 Replies View Related

Prompt User For Directory And Filename; Then Save File In Directory With File Name

Jun 10, 2009

I am trying to prompt the user for the directory to be saved in and file name to be saved as; then save the workbook in the input directory with the inputted file name.

View 3 Replies View Related

Add-In And Save Dialog-Box

Oct 21, 2008

I'm building my first Add-In, which I'm using to gather all Sub's that I've created through my small VBA writting career. The thing is that when I write new code and some reason exit Excel and forget to save the XLA, obviously the code is lost. I've used:

View 4 Replies View Related

Macro Won't Appear In Dialog Box

Jan 3, 2013

I have some code in a standard module. When I try to run it, it does not appear in the dialog box. The code's below.

Code:
Sub CopyCat(ByVal Target As Excel.Range)
If Target.Column 21 Then Exit Sub
If Target.Value = "Y" Then
Cells(Target.Row, "A").Copy Destination:=Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1)
Cells(Target.Row, "B").Copy Destination:=Sheets("Sheet2").Range("B" & Rows.Count).End(xlUp).Offset(1)
Cells(Target.Row, "C").Copy Destination:=Sheets("Sheet2").Range("C" & Rows.Count).End(xlUp).Offset(1)
Cells(Target.Row, "D").Copy Destination:=Sheets("Sheet2").Range("D" & Rows.Count).End(xlUp).Offset(1)
Cells(Target.Row, "E").Copy Destination:=Sheets("Sheet2").Range("E" & Rows.Count).End(xlUp).Offset(1)
End If
End Sub

View 9 Replies View Related

Opening A Dialog Box

Jun 17, 2005

ive created a spreedsheet for work calculating money etc from different tills. is there a way i can have a box appear when the spreadsheet is opened asking for particular information to be entered.

EXAMPLE: ....

View 9 Replies View Related

Dialog Woksheet

Feb 20, 2007

I have created a worksheet with Excel Dialog worksheet. I have Edit Boxes and have input data into them. Is it possible to add these data and put the result in another Edit Box,

View 9 Replies View Related

Act The OK Button On The Dialog Box

Aug 6, 2007

I've written a function macro that results in a dialog box popping up as in ....Application.Run "showsampdat"

What is the general Syntax for adding a macro line that will enact the OK Button on the Dialog box so that the user will never see the dialog box but the OK button functions?

View 9 Replies View Related

Dialog Boxes

Jan 13, 2010

I have created a dialog box for entering data into once that data has been entered i want the dialog box to store the data into a separate worksheet at A2 in then want the dialog box to clear and reappear ready for new data to be entered. This new data would then need to be entered at A3 etc etc etc. Is this possible and how would i go about doing this.

View 9 Replies View Related

No Macro But Dialog Still Appear

Jan 29, 2007

I am very sure that I have deleted all my macro in my excel spreadsheet and saved. However, when I tried to open the file, the macro dialog prompt me again..... I have press alt F11 and confirmed that there is no macro.

View 6 Replies View Related

Unknown Popup (not A Dialog Box)

Dec 31, 2009

I'm modifying a template that originally shipped with Excel 2003 (I have not upgraded to 2007). In the template, there is a pop-up box (not a dialog box) that shows up when I'm on certain cells. I've attached an image of it. It's the yellow box containing the words "Company Information..." etc. I cannot find any way to remove it! It's not a comment, and selecting it doesn't allow you to edit it. What is it, and does anyone know how to remove it?

View 2 Replies View Related

Open Print Dialog Box

Feb 23, 2010

I would like a macro to print 2 sheets in a workbook. I can write the macro that will select the sheets I want, but I don't want it to just go and print because depending on if the user wants it printed in color, b&w, etc.

they have to choose a different color. What code do I use to open the print dialog box?

View 2 Replies View Related

Show Symbol Dialog

Jul 15, 2008

I want to show the insert symbol dialog through vba code. How?

View 12 Replies View Related

Save File Dialog Box

Jun 18, 2009

what command can i use to bring up the save as dialog box ( where to name your saved file) if my file is already named?

View 2 Replies View Related

Save Dialog Box Cancel

Jun 19, 2009

How can this be edited so when the savebox comes up when i hit save it saves the file but when i hit cancel it goes to error:

View 14 Replies View Related

Changing SaveAs Dialog Box

Oct 31, 2009

I'm hoping someone can stop me going crazy with what should be something very simple. To make things easier at the end of my code, all I'd like to do is bring up the SaveAs dialog box and have it default to a specific directory so that the user doesn't have to click through the mountain of various files and folders we have.

View 6 Replies View Related

Insert CR Into Word Art Dialog Box

Jan 19, 2010

I attached a file with macro7 that prompts the user for text that will get rotated and inserted into the top left corner. The text is in the form "batch xxxx." I need a carriage return between the word "batch" and the numeric string. I guess the input box should have two lines instead of one.

the code does some other stuff which is why it takes a while to execute ....

View 12 Replies View Related

Insert Symbol Dialog Box

Nov 20, 2006

Quick VBA question: does anyone know how to let VBA open the Insert symbol dialog box?

View 9 Replies View Related

Open File Dialog Box

May 3, 2008

I am looking for code that when cmdfile is click, it will open up the 'open file' dialog box, and go to a specified directory on the pc, and list ALL files in that folder, but not open it. I want the user to select the file manually.

I found the following code on the forums, but don't know if it is relavent in my case

Const myDir As String = "C:NAVIGATIONPERSONAL
ussNLN"

View 9 Replies View Related

Date Format In Dialog Box Changes

Feb 21, 2010

I have the a spreadsheet with macro which copies the first sheet and renames. This I have working OK. I then have within this macro the following code to delete the contents of a cell (the date) and have the macro open a Input box and enter that date in the same cell. If no date is entered in the Input Box, then I want todays date entered.

The date from the Input Box works except every second sheet created reverts from the date format dd/mm/yy to mm/dd/yy.

If no date is entered in the dialog box, todays date does not activate.

I have checked the formatting of the cell and windows.

ActiveSheet.Unprotect ("Password")
ActiveSheet.Range("J281").ClearContents
ActiveSheet.Range("J281") = InputBox("Enter Date if not todays date", "Type:")
If Range("J281") = "" Then
Range("J281") = Date
End If
ActiveSheet.Protect ("Password")

View 9 Replies View Related

Pre-populate Save As Dialog Box

May 26, 2006

How can i call the Save As dialog box from a macro, and pre-populate the filename field with a cell value from the workbook? I have tried this code

With Application.Dialogs(xlDialogFileSaveAs)
.Name = Sheets("Calcs").Range("b37").Value
.Show
End With

with the cell reference being what i want to show in the filename box. Each time i run it, i get an error message, "run time error 1004, application defind or object defined error"

View 7 Replies View Related

Redirecting Hyperlink Dialog Box

Sep 12, 2006

how to redirect the Hyperlink Dialog window to a another folder.

Referring to the attached .jpg the 'Look in:' combobox points to the same folder as where the excel file resides. I would like this dialog box to open up with the PDF Drawings folder.

I have tried with the following code (and it shows the address in the 'Address' combo) but does not work.

vntContent = ActiveCell.Value
ActiveCell.Hyperlinks.Add Anchor:=Selection, Address:=PDF_Address, _
TextToDisplay:=vntContent

' PDF_Address = "\SACUD01SATechServMasterfilesDrawingsPDF
' Drawings"

I am using Excel 2003

View 3 Replies View Related

Built-in Dialog Box Modifications

Dec 28, 2006

I need to modify 2 Excel built-in dialogs via VBA. Here is the first dialog box:

Application.Dialogs(xlDialogWorkbookCopy).Show

First, in the "Move or Copy" window, where it says, "move selected sheets to book:" I'd like the default selection to be the open workbook instead of "(new book)", which is the current default. How can this be done?

Second, I'd like to remove the check box so there is no option to copy visible, however, I need to add the code in the sub procedure to make a copy. How can I do this?

The second dialog box I need to modify is this one:

Application.Dialogs(xlDialogPageSetup).Show.

What I need this to do is open with the tab" Header/Footer" visible as a default, or, better still, have only the "Header/Footer" tab available and the other 3 tabs not there at all. How do I do this?

View 2 Replies View Related

Activating Sheet From A Dialog Box

Feb 2, 2007

I have made a dialog box open using VBA to select some file,

Function FSel()
filetoopen = Application. GetOpenFilename("Document Files (*.xls), *.xls", 1)
Workbooks.Open Filename:=filetoopen
End Function

I need to activate the sheet which is selected in that string "filetoopen".I am not getting the way to do this ,the normal Windows(" " ).Activate is not working with variable as input.

I am placing the funcation Fsel in a loop so each time it asks for the file to open which is not proper,so i wanted to activate sheet .

View 9 Replies View Related

Protect Sheet Dialog Box Default

Oct 22, 2007

I am working with Excel 2003 and find that the default "Protect Sheet" dialog box opens with a default of both the "Select locked cells" as well as the "Select unlocked cells" check boxes marked. Is there a way to change this default?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved