home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.comp.os.windows-xp      Actually wasn't too bad for a M$-OS      17,273 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 17,106 of 17,273   
   R.Wieser to All   
   Re: Problem : BrowseForFolder returns "T   
   16 Dec 25 14:26:30   
   
   XPost: alt.comp.lang.vbscript, alt.windows7.general   
   From: address@is.invalid   
      
   Paul,   
      
   > When presented with your code, CoPilot sez:   
   >   
   > This code selects a folder.   
   >   
   > Set shell = CreateObject("Shell.Application")   
   > Set folder = shell.BrowseForFolder(0, "Choose a folder:", &H4000, "c:\")   
      
   Than its hallucinating.  The &H4000 means "The browse dialog box displays   
   files as well as folders.".  Which it does.   
      
   > This code selects a file. We'll see in a moment, what the Copilot is up   
   > to.   
   >   
   > Set dialog = CreateObject("UserAccounts.CommonDialog")   
   > dialog.Filter = "All Files|*.*"   
   > dialog.FilterIndex = 1   
   > dialog.InitialDir = "C:\"   
   > dialog.ShowOpen   
      
   Damn.  Before posting I googed for a VBScript file-selection copability, and   
   did not see that one come by. :-\   
      
   But, I just tested if it would work for me, and it does.  So, thank you. :-)   
      
   I have to say, I didn't even know about the existance of that "UserAccounts"   
   object. Something to look into (new stuff and all that).   
      
   Regards,   
   Rudy Wieser   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca