By using you agree to our cookie policy, We and our partners operate globally and use cookies, for multiple purposes

Become an Σxpert at Σ


Standard VBA/Excel (91 of 1075)

(Clear Filter = *File*)

Dim sFile$, sZipfile, test as string
How to write a function to open a zip file when the file sometimes is zip and sometimes xlsb
File suffix - zip, xlsb, txt, xls, xlsx, xlsm, pdf, htm, html
kill - delete a file
DownLoadFileFromWeb(to,from) - udf
Creating a folder
ChDir - Files
File wildcard character * or ?
Dir - files - process a directory or check if a file exists
ActiveWorkbook after opening an excel file
VBA on 2 or more Excel files opened at the same time
OpenDQFile - udf to open the Data Quality file from web/sharepoint and unzip it
vlookup to external file - '[file name.xlsm]sheetname'!$C:$F
RunProgram "http.." (File Associations need to set up)
DownloadFileFromWeb(strURL, savetoPath) - udf using api
SaveStringtoFile string, "c:\xyz.txt" - saves a string to a file
FileLen(sFile) - gets the length of the file
GetVersionForECMTemplates - goes thru a directory and get the last mod and size of each file
Walk a file - get all files in a directory
logit2(s) ' writes data to sequential file ' udf
bOpenSeqFile(sFile,"A") ' "O" output "I" input
txt files
Close #x ' Close a seq file
\\ ' network file prefix
ActiveWorkbook.SaveAs sFile
vFileLen(sFile) ' udf to create an excel function to get the filelength
Mkdir - files - creates a new directory
udf - CreateMultipleDirectorys from a list (files)
ActiveWorkbook.Worksheets("....").Autofilter.sort.sortfileds.clear ' clears a filters sorting ' recorded
SaveAllAsPDFFile - Internet - - Robert Sparnaaij
set fso = CreateObject("scripting.filesystemobject")
FileCopy from, to
PPT.Presentations.Open sFile, ReadOnly:=msoTrue
WorkBooks.Open sFileout, UpdateLinks:=False
PPT.ActivePresentation.SaveAs sFile
Error File in use
AddFinalSlash - udf - files
GetLatestVersion(sfilename) - get the file with the latest version
A01 CopyToDocumentumSweep - copies files to a network directory
GetFileName(fullpath) - returns the file name without directory
ActiveWorkbook.SaveCopyAs sFile
Attach a file to an email
GetFileCreator - internet - used shell to get the name
GetLastSlash(s) - File
Print #x,string
Show directory via File Explorer - RunProgram "C:\directory_name"
Wait until a file appears
IsAutorun() - udf looks at the filename if has the name autorun then set flag to true
SECDataAvailable - udf - db - checks for a condition (cob date from db > month-end data) and send email, generates a file
FileToMD5Hex - internet - security
FileToSHA1Hex - internet - security
GetFileBytes - internet
Use file name to denote something like "-quick" isn't the full result
Set ppttemplate = PPT.Presentations.Open(sFile, ReadOnly = msoTrue
SaveStringToFile - udf 🔝
RunSQLFromFile - udf - db 🔝
Run SQL from a file
Run SQL and save output to a sequential file
GetNextVersion - udf - passed file and returns the next version of the file
GenerateExcelFiles from a db - udf
a filename can't use certain characters line "/" so change it if creating it from data
Err = 53 ' file not found
SetAttr sFilename, vbReadOnly
ActiveSheet.PivotTables("pt1").PivotFields("coper_id").PivotFilters.Add Type:=xlTopCount, DataFiled:=... ' recorded
Dim FileSystemObject As New FileSystemObject
FilesSystemObject.CopyFile sfrom, sTo
dir(filename) = ""
Import module file and there is a duplicate routine (I named the routine with a suffix "_dbs" for the module
LoadData(sFile) - udf - loads a file's data to a string
Log2File udf
LoadFileToString(sFile) - udf
CompareTwoFiles() - udf
ActiveWorkbook.worksheets("sfile1").sort.sortfields.Add Key:=Range("N2"), SortOn:=xlSortOnValues, order:=xlAscending, DataOption=xlSortTextAsNumbers
Get ini file - gsINIFile = Left(ThisWorkbook.Name, Len(ThisWorkbook.Name) - 4) & ".ini"
Open iniFile For Input As 1
tab delimited file
CSV file
Monthly Processes (MoM files)
XML File format
Create HTML files
xla files
xlt Files
Home | Excel Syntax Checker | About | Videos | Feedback | @alecberg | websites | FAQ | Memes | Thanks | Copyright © 2021 All Rights Reserved. Edit