Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login

POZE MRRRR'S FORUM (VIEW ONLY)

Nu sunteti logat.
Nou pe simpatie:
Karlla pe Simpatie.ro
Femeie
22 ani
Timis
cauta Barbat
22 - 44 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [EXCEL] Save Active Workbook to Desktop Automatically Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
TRaP
Moderator

Inregistrat: acum 6 ani
Postari: 748
Pressing a button linked to the following code will open an InputBox asking for the desired file name, then after pressing OK the file will be saved to desktop.

Source for getting special folder path using VBA:
Rest was done with macro recorder.



Sub FileSaveToDesktop()

Dim FileName As String
Dim objSFolders As Object
Dim FilePath As String
Set objSFolders = CreateObject("WScript.Shell").SpecialFolders

FilePath = objSFolders("desktop")

FileName = InputBox("Enter file name and press OK to save it to Desktop as xlsx file")

    ActiveWorkbook.SaveAs FileName:= _
        FilePath & "\" & FileName & ".xlsx", FileFormat:= _
        xlOpenXMLWorkbook, CreateBackup:=False
End Sub



pus acum 5 ani
   
Pagini: 1  

Mergi la