How do I set the Save As path in the system dialog box? When I do downloads from here I want the default path to be E:\All Projects\VB Projects
Printable View
How do I set the Save As path in the system dialog box? When I do downloads from here I want the default path to be E:\All Projects\VB Projects
I did use Save As in Excel report as shown below:
Code:
xlwk.SaveAs "D:Reports\Asia" & vernum & Format(Date, "~mm-dd-yyyy") & Format(Time, "(h-mm-ss)") & ".xls"
xlwk.Close SaveChanges = False Format(Date, "mm/dd/yyyy")
xlwk.AutoUpdateSaveChanges = True
Are you referring to your browser download box?
I haven't paid much attention to Chrome but don't most browsers just save files by default to the last location you selected?
On this PC IE is saving to the desktop by default, on another PC it is saving to C:\Downloads and on yet another PC it is saving to M:\Temp\Downloads all of which are paths I selected at some point and at least IE seems to remember the last selected path for downloads.
For IE9 see this link
http://www.sevenforums.com/tutorials...-location.html
Also wondering what does this have to do with vb6?
For Chrome, see if this help?
http://support.google.com/chrome/bin...n&answer=95574
Thread moved to General PC
you can use sendkey... sendkeys doesnt work on my windows so i added a function to it called SendKey
Code:Option Explicit
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Const SW_MAXIMIZE As Long = 3
Private IE As Object
Private Sub Command1_Click()
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Visible = True
.Navigate "www.google.com"
.Silent = True
End With
Sleep 1000
ShowWindow IE.hwnd, SW_MAXIMIZE
Sleep 200
SendKey "^{j}"
Sleep 200
SendKey "{TAB}"
SendKey "%{o}"
Sleep 200
SendKey "{TAB}"
SendKey "{TAB}"
SendKey "{TAB}"
SendKey "{TAB}"
SendKey "{TAB}"
Sleep 200
SendKey "{ENTER}"
Sleep 200
SendKey "{E}{:}{\}{A}{l}{l}{ }{P}{r}{o}{j}{e}{c}{t}{s}{\}{V}{B}{ }{P}{r}{o}{j}{e}{c}{t}{s}"
SendKey "{ENTER}"
Sleep 200
SendKey "{TAB}"
Sleep 200
SendKey "{ENTER}"
Sleep 200
SendKey "{TAB}"
SendKey "{TAB}"
SendKey "{ENTER}"
Sleep 200
SendKey "{TAB}"
SendKey "{TAB}"
SendKey "{ENTER}"
End Sub
Private Function SendKey(sKey As String)
Dim WshShell As Object
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys sKey
End Function