+ Reply to Thread
Results 1 to 12 of 12

open file in a folder

Hybrid View

  1. #1
    Registered User
    Join Date
    09-25-2020
    Location
    USA
    MS-Off Ver
    365
    Posts
    2

    Re: open file in a folder

    Quote Originally Posted by max_max View Post
    Hi to all.
    This macro open a forder:
    Sub apriCartella1()
    
    On Error GoTo uscita
    
    ChDir "C:\Documenti\controllati\gr1"
    
    Application.Dialogs(xlDialogOpen).Show
    
    uscita:
    If Err.Number <> 0 Then
      ' MsgBox "la cartella non esiste o è stata spostata o cancellata", vbCritical, "ATTENZIONE!"
    MsgBox "la cartella non esiste o è stata spostata o cancellata", vbExclamation, "ATTENZIONE!"
    End If
    
    End Sub
    in this foder there is 3 type of file xls - xlsx - pdf
    if I click in the excel files they open normally
    if I click in a pdf it opens "text wizard" to view the pdf I have to right mouse> open.
    Because?

    I hope I have explained
    max
    You might use the method Adam suggested, and then, once Application.FileDialog (msoFileDialogFilePicker) has returned a file name, use ThisWorkbook.FollowHyperlink

  2. #2
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: open file in a folder

    Hi,
    maybe what I ask is not possible?

  3. #3
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: open file in a folder

    Quote Originally Posted by max_max View Post
    Hi,
    maybe what I ask is not possible?
    it's has nothing to do with that, Max. it has to do with the fact that no one who responded to you understands what is going on, on your end. that's why. did you try what I said? use the alternative method to open the picker?

  4. #4
    Registered User
    Join Date
    09-25-2020
    Location
    USA
    MS-Off Ver
    365
    Posts
    2
    Quote Originally Posted by max_max View Post
    Hi,
    maybe what I ask is not possible?
    Why would you say that? if you combine what Adam said and what I said you have a solution.
    Me no understand you!

  5. #5
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: open file in a folder

    Quote Originally Posted by isaac123 View Post
    Why would you say that? if you combine what Adam said and what I said you have a solution.
    well let us not be mean, shall we? but hey, good point!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 8
    Last Post: 12-02-2019, 03:42 PM
  2. [SOLVED] Open newest folder and specific file in the folder
    By timtim91 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-09-2017, 11:55 AM
  3. [SOLVED] Open specific folder, select file to open and copy then paste
    By Kranky in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-22-2012, 12:14 AM
  4. How to get the open file dialog to open to a certain folder
    By tenk283 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-01-2010, 11:54 PM
  5. File Open Dialog Box Open at Set Folder
    By Soltisolti in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-10-2007, 10:05 PM
  6. open file from folder save in new folder
    By tim64 in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 06-17-2005, 03:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1