Results 1 to 9 of 9

Thread: System SaveAs Dialog Box

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    System SaveAs Dialog Box

    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


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  2. #2
    Hyperactive Member
    Join Date
    Jun 2012
    Location
    I'm living in VBForum bcz its members deserve respect and appreciation
    Posts
    333

    Re: System SaveAs Dialog Box

    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

  3. #3
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: System SaveAs Dialog Box

    Are you referring to your browser download box?
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: System SaveAs Dialog Box

    Quote Originally Posted by koolsid View Post
    Are you referring to your browser download box?
    For the most part, yes, but I use two different browsers, Here, I use Chrome mostly but at times I do use IE.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  5. #5
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: System SaveAs Dialog 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.

  6. #6
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: System SaveAs Dialog Box

    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
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: System SaveAs Dialog Box

    Quote Originally Posted by koolsid View Post
    Also wondering what does this have to do with vb6?
    Because I download VB6 code from here


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  8. #8
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: System SaveAs Dialog Box

    Thread moved to General PC
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  9. #9
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: System SaveAs Dialog Box

    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
    Last edited by Max187Boucher; Jul 21st, 2012 at 05:52 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width