getopenfilename

  1. G

    Application.GetOpenFilename error

    I'm having new problem with a macro that I have been using for several years. The macro allows me to import data from a prior year spreadsheet into the current version of the spreadsheet form. The problem is intermittent and only seems to occur in specific folders on my laptop. MyFile =...
  2. M

    VBA to Select Multiple Files when one is too long

    Trying to use the code below. If I select two files for example, and one of them is longer than 255 characters (including path), Excel will crash. It ignores my error handler and just crashes. I cannot figure out a way to get past this. Any ideas? Sub Macro1() Dim vSelectFiles As Variant...
  3. J

    Populate combobox with sheets name

    Hi, I have a Sub which selects an Excel file by dialog box. On selecting the file, a TextBox (Besides the Browse button in Userform) displays the full path of the selected file. Now There's also a Combobox below that textbox in which I want to populate all the Sheet names which are there in the...
  4. S

    Why does my text file open in a new workbook?

    Hello! I googled a code to open a text file and I can't remember where I found the code. To be honest, I don't know what a querytable is yet. The file format is actually a "*.eft" which can be opened up in notepad. I want to achieve 2 things: open the textfile in my CURRENT workbook and the...
  5. A

    Keep GetOpenFilename in memory while adding a link and performing a copy/paste to SharePoint with appended filename

    Hello folks, This should be an interesting topic. I did research and managed to create a series of Subs that Upon double-click in a column cell Prompted Application.GetOpenFilename (opening a file explorer window) Applied full file-path in the cell as a hyperlink...
  6. B

    Search for string using getopenfilename (code included)

    Is it possible to search for a specific string while using the getopenfilename function? I'm just trying to narrow down the files in the folder to be more relevant to the user. Currently my code takes a few inputs from the user and then opens windows explorer to let them locate the files they...
  7. U

    VBA Code to Switch Between Workbooks and Get the Filename as Text without the Path

    Hello, I currently have a workbook which another worker will enter information into, and which I will then pull information out of into a workbook I use. The workbook they have is a form in which they will fill in all necessary information about a project. I get the workbook from then, open it...
  8. B

    VBA - GetOpenFilename

    I am almost positive I am going about this all wrong - I am trying to open files out of the directory dialog and set them based on a wildcard name. I am thinking it has to do with the declarations between as workbook or as string or as variant. I'll eventually be using 'Windows().Activate' to...
  9. B

    Open Multiple Files in Same Dir

    I have found this great code someone had wrote that when ran, allows you to select certain files in the same directory and run the same macro/procedure on each of them - in my case is just a straight copy and paste. The problem I am having with it I believe is related to the targeted 'paste...
  10. R

    Error in getopenfilename when closing without choosing a file

    Hello, I have the following code in a module and works fine, the problem is when the user closes the window without choosing any file the macro crashes and displays error 1004, I tried some codes from the forum but nothing worked. Filename = Application.GetOpenFilename _ (FileFilter:=Filt...
  11. S

    I am new here and need help

    I have a folder with 5-6 workbooks and each workbook has multiple worksheets. I am trying a code to loop through the sheets in each workbook in that folder (which ever is selected on running the macro) copying the data from B:H and pasting the data in Mastersheet with Sheet1 name as...
  12. R

    The API function GetOpenFileName does not work in Excel 2010, but works in Excel 2007

    The function GetOpenFileName does not work in Excel 2010 (32 bit) in Windows 7, but does work in Excel 2007 (32bit) in Windows. The window does not open and returns "false" to Output. To test the code, you need to run the sub startit. The problem happens in thCommonFileOpenSave, Line containing...
  13. M

    VBA Email file upload

    Hi guys i have this issue. I'm uploading a .msg file but i can't seem to go through with the DisplayAsIcon option and i also want to put the Date at the end of the file's name,to somehow track the uploaded files and maybe sort them by date. At the time of the upload moment i see the filesname...
  14. H

    Get filename

    Hi, I would like to browse my computer and insert the filename into TextBox1. I use this: VedleggFil = Application.GetOpenFilename() Rapport_VedleggForm.TextBox1.Value = VedleggFil The problem is that it inserts the whole path when I only want the filename. Anyone knows how to fix that?
  15. A

    Referencing workbooks opened with GetOpenFilename

    Hi everyone, I cannot seem to be able to work with the GetOpenFilename on the following piece of code (PLbook is the workbook containing the macro) Dim CApath As Variant Dim PLbook As Variant ThisWorkbook.Save CApath = Application.GetOpenFilename(Title:="Close Allocation Model") Set...
  16. T

    Select and Import delimited data file (ERA)

    I have begun to chase my tail on this one, so help me out. I need to summarize some data from multiple files but I can't seem to have the user select the file and import it. It's a ERA(electronic remittance advice) 835 file that will import with the "Import Text File" routine. I've added...
  17. A

    MSQUERY - optimal running

    happy new year to all. I am in a quandary this morning. the organisation i am working for at present has a nasty habit of dumping information on a weekly basis into spreadsheets on the network. The business unit that I work with then adds the new data to the previous weeks and reports on a year...
  18. C

    GetOpenFileName method question

    I'm trying to use the GetOpenFileName method to pick up a file without actually opening it. Then I will use data from this file to populate several other worksheets that are opened. However, I need to be able to reference a specific sheet on the file I select with the GetOpenFileName method...
  19. H

    GetOpenFilename error with spaces in file

    I'm not sure why but the following code results in an error when the file you point to includes spaces. It works fine otherwise. Any thoughts? I'm thinking maybe I can replace the spaces with nil? Filename = Application.GetOpenFilename("Adobe PDF (*.pdf),*.pdf") destinLOC =...

Some videos you may like

This Week's Hot Topics

Top