Is there some different way that I have to do this for it to be compatible with Windows 7? I also don't have Windows 7 to test any of the options anyway. Related 723How do I prompt for input in a Linux shell script?0vbs script to send data and repeat2Script to remote lock a screen under Windows 71How do I get Microsoft Script That finally "clicked".
So, it is for starting to solve the problem.Regards. Does this help you resolve the problem you are seeing in your script? __________________ --Todd VanDyke Software Technical Support [email protected] 505-332-5730 rtb View Public Profile Find all posts by rtb ptc-1176891 Oct 13, 2010 3:40 PM (in response to AlvaroDíaz) Alvaro,This will work very well for me; THANKS!Preston Like Show 0 Likes (0) Actions Go to original post Actions Remove from Sorry.
It belongs in a thread of it's own. Do you have an error code for the CreateObject failure? –Rob Perkins Jan 6 '11 at 21:51 Possible duplicate of How can I use the common Save As dialog Thank you. 0 Question by:APD_Toronto Facebook Twitter LinkedIn Google LVL 20 Best Solution byltlbearand3 This object is only available in Windows XP. Objshell.browseforfolder To Select File Short URL to this thread: https://techguy.org/1085713 Log in with Facebook Log in with Twitter Log in with Google Your name or email address: Do you already have an account?
Script Is Closing Down" Set objFile = Nothing Set objFilePath = Nothing Set objShell = Nothing Set objFSO = Nothing Wscript.Quit End If Set objFile = Nothing Set objShell = Nothing Vbscript Browse For File Windows 7 Advertisement FinTechie Thread Starter Joined: Feb 23, 2012 Messages: 12 I understand this was an undocumented feature in WinXP, but I used it a lot to present an open file dialogue Thanks for the link I'll give that a try as well. Below is my new code.
No problem Todd. Vbscript Browseforfolder It's been a while since I've done this stuff so I'm not up to date at all. __________________ There are some things that we will never know And we will never Stay logged in Sign up now! Dim sBrowseFilter, oBrowseDialog Dim objWord Dim objFile Dim objReturnFile 'set the type of dialog box you want to use '1 = Open '2 = SaveAs '3 = File Picker '4 =
After installing classic shell to get the old start button functionality back (http://classicshell.sourceforge.net/) and turning off all of the visual effects (aka - ‘Adjust for best performance' setting), my desktop is https://communities.mentor.com/thread/11587 zip). Vbscript Open File Dialog Windows 7 This is really redundant and not needed since you can use the first Excel instance you created to both call the open file dialogue and then later open the workbook. Vbscript Filedialog The time now is 12:14 AM.
Quote: # $language = "VBScript" # $interface = "1.0" Sub Main '------------------------------------------------------------ Dim ObjFSO, InitFSO, Wscript sDir = "D:\Documents and Settings\script" Set ObjFSO = CreateObject("UserAccounts.CommonDialog") ObjFSO.Filter = "Text Files|*.txt|All Files|*.*" ObjFSO.FilterIndex Now I'm slowly working through my kit bag of productivity scripts that I created for XP and trying to get these to function in Windows 7. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste… Visual Basic Classic Simple Games Article by: Martin Here are I leveraged this control to allow the user to select a file for upload. Vbscript Open File Dialog Box Windows 7
Join our site today to ask your question. Please type your message and try again. 3 Replies Latest reply: Oct 13, 2010 3:40 PM by ptc-1176891 VBScript error thanks to Windows 7? All rights reserved. In my original code, I'm setting a file filter with line 72, and the initial directory from which to select a file with line 74: 71 'setup the File Browser specifics
Learn the most practical features and best approaches for ASP.NET. Fileopendialog Here's the current code: Code: Sub Open_File_Dialog Dim objDialog, intResult 'Displays an open file dialog box and opens file selected Set objDialog = CreateObject("UserAccounts.CommonDialog") objDialog.Filter = "Excel Files (.xls)|*.xls" objDialog.FilterIndex = Featured Post Training Course: Java/J2EE and SOA Promoted by Experts Exchange This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling,
It's just what I needed.Eduardo, thanks for the updated code...works great.Umm...except for one small thing. Hasanyone found an easy way to write this script so that it works in Windows 7? Very obscure job posting for faculty position. Re: How to display a file selecting dialog on Windows7 Satoru Apr 2, 2013 12:04 AM (in response to olsmir) Hi Oleg-san,UserAccounts.CommonDialog can't be used on Windows7.There is a type which
Perhaps a little more context will help: 69 Sub Main() 70 71 'setup the File Browser specifics 72 ObjFSO.Filter = "Today's Load|" & mmdd() & "|All loads|????|All Files|*.*" 73 ObjFSO.FilterIndex = ptc-1176891 Oct 13, 2010 10:34 AM A worksheet we have been using successfully for many months now throws errors as my users are upgrading to Windows 7. All rights reserved. Microsoft Windows 7 Professional |C:\windows|... 'OSType e.g. 18 / OSArchitecture e.g 64-bit 'Version e.g 6.1.7601 / BuildNumber e.g 7601 winVersion = CInt(Left(objItem.version, 1)) Next Set objWMIService = Nothing Set colItems =
subscribe Home Register Calendar Today's Posts FAQ Archive © Xtremevbtalk.com 2001 - 2016. Thread Status: Not open for further replies. share|improve this answer answered Jan 6 '11 at 21:58 Rob Perkins 2,1181342 I believe this to be correct –David Heffernan Jan 6 '11 at 22:02 Thanks for Not the answer you're looking for?
A "Then" statement was left out. ....Set objShell = CreateObject("Shell.Application")Set objFile = objShell.BrowseForFolder(0, "Choose a file:", &H4000) If IsValue(objFile) Then '<<-------------This "Then" was omitted. Symbiotic benefits for large sentient bio-machine PuTTY slow connecting to Linux SSH server Why don't you connect unused hot and neutral wires to "complete the circuit"? DrPunk View Public Profile Find all posts by DrPunk « Previous Thread | Next Thread » Currently Active Users Viewing This Thread: 1 (0 members and You can't call native Windows API functions directly from VBScript, so GetOpenFileName is not going to work.
only .ini files?ReplyDeleteAdd commentLoad more... Techniques and thoughts worth documenting. Below is thescript that I previously used along with the error I get when i try to run it. There is a method called FileOpenDialog which allows a script to have a user select a file for use in a script.
On the Windows 7 machine, the first timethe HTA was run, the path was setto my Desktop.