Display File Open For User To Choose

May 24, 2009

I have code (below) that works if the range "ImportFile2" contains a valid value but I want users to be able to select any .csv file preferably from a directory which should be held in a cell.

I added ...

View 9 Replies


ADVERTISEMENT

Allow User To Choose File To Open

Oct 19, 2006

We have several salespeople who maintain a workbook tracking their workflow. I want to compile the customer account number, account name and deal number for each rep to another workbook. A new sourcebook is started each week. This code is in the target book

'Option Explicit

Public sourcebook As Object 'the workflow workbook

Sub GETDATA()

Dim wsc As Double 'the number of pages in the workflow

Dim col As Long 'the column in this workbook for returning values

Dim IntEndRow As Double 'the end row in this book

Dim SrcEndRow As Double 'the end row in workflow

Dim findval 'the column workflow where the sourcedata is found

My code allows the user to select a workbook and then loops through each sheet in that book searching for the column which has the info I need, this changes on each sheet as the reps each deal with different types of customer as so take different details. I solved this by having column headers in the target book and searching for them in the sourcebook.

This code works when I step through it but falls over at the "Set sourcebook" line when I run it where it returns a breakpoint error.

View 3 Replies View Related

Allow User To Choose Folder/File To Open

Apr 18, 2008

I am trying to open a folder so I may choose the workbook to open. I am able to open a workbook but I want to open the folder which contains the workbook.

View 6 Replies View Related

Macro: Allow User To Choose Workbook/File To Open

Sep 8, 2006

I am making a macro that requires that user to enter a directory path into a input box and the macro will open the file. Right now it works fine bit i would like to change the code so that instead of using an input box it brings up a box that will allow them to browse files on their computer and then select one to open.

View 4 Replies View Related

Allow User To Choose From List Of Open Windows?

Mar 27, 2009

I have a few macros that need to work with various worksheets which are in different windows.

1. Make the user name the files a certain way for consistency
2. Make the user type the name of each window at the start of execution

I was wondering if there was a more flexible option though: one which would allow the user to choose from a list of open windows (similar to the Window>More Windows>Activate function in Excel).

Ideally the macro would run and say something like, "Which of the following open windows contains dataset1?" "Which of the following open windows contains dataset2?"

View 2 Replies View Related

User To Choose Multiple Files To Open

Mar 26, 2008

I have a control button that uses this code

ChDir "H:EMCARCHIVE"
varFileName = Application. GetOpenFilename("Excel Files (*.csv), *.csv, (*.xls), *.xls")

however the files list but when you select any one of them they do not open and the file name is not displayed in the filename box

can you let me know why the files do not open

View 4 Replies View Related

Allow User To Open File

May 21, 2007

I Want make a code to open (OPEN File Dialog)
and it works good I can't change the Diroctory!

Sub OpenFile()

fileToOpen = Application. GetOpenFilename("Execl Files ( *.xls), *.xls")

ChDir "C:" ' Not work good

If fileToOpen <> False Then
Workbooks.Open Filename:=fileToOpen
Else
Exit Sub
End If
End Sub

check this code.

View 5 Replies View Related

User Select File To Open

Oct 17, 2011

I am writing code that requires data from another workbook. Instead of hardcoding the directory and filename (which changes daily), how can I have the code prompt the user to do this for me?

I want to open the file with:

links updated
read-only

Also, is there a way to have an initial directory that appears so the user need not go through a dozen directories every time to get to the file?

View 3 Replies View Related

Prompting User To Open File?

Oct 18, 2011

I have code that prompts the user to open a specific excel file. However, with the following:

Filepath = "..."
name = Application.GetOpenFilename(FileFilter:="Excel Files *.xls* (*.xls*),",)
Workbooks.Open name

the default directory you start out in in the window that prompts the user to select a file is NOT ...

How can I properly assign which directory the user starts in so they need not go through 10 sub-directories everytime they run this code?

View 2 Replies View Related

Open A User Defined File

Jun 18, 2007

I want to open a user defined file name in excel and then activate it , to run a macro on it.

View 3 Replies View Related

VB Code To Open A File That User Chooses

Mar 11, 2008

I'm trying to write a macro that will bring up the "File Open" dialog box, and allow the user to navigate to the directory where the file is located. It won't be the same file every time, and the files will likely have different names.

View 14 Replies View Related

Open File Based On User Selection

Oct 23, 2008

The code below opens a window which allows the user to select a file to open. Apparently, it starts in the directory of the file containing the macro. How would I modify this to open in "M:Archived PO ResponsesProcessed"?

View 3 Replies View Related

Check Which User Has File/Workbook Open

Jul 28, 2004

I have a program that opens an excel-workbook, I first check whether the file is opened by another user(open for read-write). This works fine, but I'd like to know which user has the file open with VBa code. ex.

workbooks.open ....
if open
then msgbox " Book opened by user"
end if

So it's the same as you open an excel(with your windows explorer) on a network and you get the message that the file is already opened by the user....

View 2 Replies View Related

Let A User Open A New .xls File And Get File Name

Nov 20, 2007

I have a workbook were a user will write down some info. Then I need to copy that data to a second workbook located anywere in the Hard drive. i used the function "GetOpenFilename" or the "Application.dialogs(xlopenfile) to ask the user where is the file (and open it). Now I need to get the name of that file. How can I get it?(the name of the file the user selected to open). P.S. I saw there is somewhere a "Print" function to copy data from a workbook to another closed workbook. I was planning to have both workbooks open and then just use several lines like:

View 4 Replies View Related

Display Server Message To User After POST File Upload

Feb 6, 2014

I'm using VBA to upload the open workbook to app.box URL which is working great! Since I'm pretty new to VBA, I can't figure out how to get Excel to display the sucess/failed message from the server to the user. I used the VBA POST upload module from this awesome tutorial, but I can't figure out how to return the message to the user. I did figure out that on the website there is an "id="after_upload_message", not sure if that works. My code is below.

[Code] ......

View 2 Replies View Related

When Use VBA To Open File - Notify User When Excel Opened By Other

Jun 14, 2014

I use the vba to open excel file. like workbooks.open filename:=abc.xlsm but I found that if the file is opened by other. Excel still open the file but it will not notify user that it is opened as read only.

Would you add more line to notify user if the file is opened by other?

View 2 Replies View Related

App To Open User's Email Client, Attach File

Apr 8, 2008

I have developed a product that's a bunch of Excel spreadsheets strung together. Real estate and mortgage professionals use the tools to counsel home buyers. We include a pdf converter in case recipients of emailed file attachments don't have Excel.

We provide an 'Export' procedure that calls a custom dll that uses the outgoing mail server that the user [must] setup or our web's mail server as a default. The action attaches the Excel or the PDF file and sends in the background. We use an Excel form for user to write the message and the process saves a copy of the message sent and the file send in an Archives folder.

This procedure is not very user friendly, as it does not offer the user's address book to select a recipient, does not put the message in the user's email client Sent folder...Plus the Archives folder could become quite large...plus it involves a user setup that creates alot of support calls.

But actually the most critical shortcoming has become that ISPs (Comcast and ATT so far) are blocking the use of custom email clients!

Recently my son showed me in QuickBooks their attach file-to-email process. It simply opens the user's default email client with the file attached. I need an app that does that! And it needs to be distributable.

View 9 Replies View Related

Display Username In Message Box That Has A File Open

Feb 2, 2010

I have bit of code that:
(1) opens another spreadsheet
(2) updates that spreadsheet
(3) saves that spreadsheet
(4) closes that spreadsheet

If the spreadsheet that requires updating is open by another user, I display a message indicating the file is open and no updates occured. There are about 20 persons within the organization that may have this file open? Is there away to display the username of the person who has the file open?.

View 4 Replies View Related

Allow User To Choose Dates To Chart

Sep 12, 2006

selecting dates and data and makinga graph

and thought I could learn this one myself. I was wrong. Andy Pope came up with a nice little spreadsheet but I could not follow it (being a novice).

The problem is, I want the user to be able to input a start date and an end date and a graph to update automatically between these dates (for the x-axis) but also the y data adjust to suit.

The input cells are C23 and C30, and the 5 Y-axis data are the coloured columns.

I have attached a zip file with the excel spreadsheet inside.

View 4 Replies View Related

Let User Choose Column Range

Aug 28, 2007

I 'm trying to do one macros where the user has to choose the column where he wants to work, to avoid the user start counting the number of the letter that corresponds in the alphabet, I would like to make it easer, because working with column numbers when programming is easier, but in terms of user is easier to work with letters

View 8 Replies View Related

Allow User To Choose Range For Chart

Apr 29, 2008

I want to make a chart with the time in x axis and all of the S in the y axis. The problem is I want to be able to choose which S that I want to put in the chart. Example, I want to make 2 chart with S2,S3 and S5 in the first chart and S1 and S6 in the second chart. What I want is when I click the button 'chart', a pop-up appear and ask which S that I want to include in the chart.

View 7 Replies View Related

Get User To Choose Location Of Linked Data

Sep 18, 2006

I've have a spreadsheet where 4 cells are linked to another workbook via a vlookup.
the problem i have is that a lot of users can update this external book, or it can be saved as a seperate spreadsheet somewhere else on the network. If it was up2 me i would have them only update the one sheet, but as it stands its not. So what i want to be able to do is put some code onto a button on the sheet, from here i want the: Application. GetOpenFileName

method to open....but from here i want them to be able to pick the cells where the data is situated. Any clues..... i can get as far as them selecting a workbook. Do you think i will need to create another userform?? Maybe RefEdit? I'm not sure.

View 3 Replies View Related

Force User To Choose From 2 Drop-Downs

Dec 29, 2006

I have two columns, Account Number and Account Type. I already use Data Validation on Account Number to make sure it is numeric and on Account Type to make sure the user picks from a drop-down list. I want it so that if a user inputs an account number, it forces the user to automatically pick from the drop-down menu in the account type column, otherwise post an error.

View 3 Replies View Related

AutoFilter - User Can Choose Range And Input From / To Date

Mar 19, 2012

I have a work book.

In column C27 and down, the user can input a date.
In column M27 down, the user chooses pass or fail.

N8, contains a date chosen by user as the "From" date and P8 the "to" date.

Cell o11 is "Passed" and cell 012 is "failed"

The user can choose a date range and input the from and to date in N8 and P8, this will count the number of pass and fails and input the number in O11 and o12.

Formulas are below.

Code:
=COUNTIFS('Aff MFR'!C27:C1663,">="&'Aff MFR'!N8,'Aff MFR'!C27:C1663,"="&'Aff MFR'!N8,'Aff MFR'!C27:C1663,"

View 1 Replies View Related

Make A List Of Selections For User To Choose From In My Combo Box?

Jan 8, 2008

How do I make a list of selections for user to choose from in my combo box?

View 9 Replies View Related

Excel 2003 :: Macro To Open Folder Then User Selects File Then Macro Continues To Run

Nov 6, 2011

I use Excel 2003 at work. I'm looking for some code that will Open a folder and then lets the user to select a file then continues to run the macro.

The file name they select will look similar to this K2271011.504 or K3011111.201

View 3 Replies View Related

Create Function To Choose And Display Optimal Configuration Of 5 Box CBM

Feb 27, 2014

I am creating a box CBM optimizing tool at work for shipping our products internationally so that the sales department and logistics can estimate shipping costs and weights with out needing me to physically pack everything in advance. I have broken every product we sell into individual CBM's as well as the boxes that we use to ship. I have also set it up to give a break down of "boxes needed" to accommodate the approximated CBM by box size.

How to create a function that will take that info and calculate which combination of boxes will utilize the available space... In other words, how do i take my break down of the 6 box sizes available, with the "# of boxes needed" data i already have, and have it tell me which combination of boxes will utilize the maximum percentage of space, or leave the least amount of unused space based off of the cumulative CBM being shipped.

Snippet attached:

Capture.PNG

View 1 Replies View Related

File Open Dialogue Box To Open In (Directory Of Tool File)

May 31, 2013

I have a tool file which contains Excel VBA codes. When I click button it asks to select a file. I want that anytime I click the button the dialogue box should open in the folder containg the tool.,

View 1 Replies View Related

Popup Window To Choose File

Dec 24, 2012

The code snippet below is to import a sheet into my main template. Right now, the code looks for the file in the same directory as the template, if the file is not there, a message box pops up advising the user when OK is pressed (see red lines), the workbook closes. However, in order to make my program more user friendly, I would like to add some more functionality to the code, so I would like to have a windows file browser window pop up where the user can browse for the file and select it in whatever directory it is.

Can this window be created in VBA?

Sub ImportFile()

Dim sourceFile As String
Dim firstDestFile As String

sourceFile = "Client Data Dashboard Template.xlsm"

[Code] .........

View 2 Replies View Related

Excel Macro That Prompts To Choose File To Hyperlink

Jun 12, 2014

I would like to write a macro that would insert a hyperlink to another file an would prompt the user to select the location of the file once the macro was run. I am not sure how I would get my macro to prompt the user to define the location (which is located on a network drive).

View 7 Replies View Related







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