getopenfilename

  1. M

    Hyperlink a cell to a specific document

    Hello, I would like to be able to hyperlink a cell to a specific document but it isn't working for me, here's what I had in mind I have already created an existing user form. It comes up with a range of textboxes that are linked to specific cells but what I would like to achieve is when the...
  2. J

    inserting pictures through vba, but the position and range doesn't match

    Hi, i made a macro by clicking the cell and inserting a picture image. But, the vba range and the sheet range doesn't match. ex. i want to insert a picture in cell b6 but it seems the picture inserts in between b5 and b6. this is my code below Private Sub Worksheet_BeforeDoubleClick(ByVal...
  3. 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 =...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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?
  17. 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...
  18. 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...
  19. 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...
  20. 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...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top