Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.
Sub Export_Data() Dim rst As DAO.Recordset Dim xlApp As Object Dim xlWB As Object Dim xlWs As Object Dim xlRng As Object Dim strTblName As String Dim strXLFileName As String Dim I As Long strTblName = "YAV_FORECAST" strXLFileName = "C:\VSS Excel Export\" & Month(Format(Now, "mm")) & " VSS Results" Set rst = CurrentDb.OpenRecordset(strTblName) Set xlApp = CreateObject("Excel.Application") Set xlWB = xlApp.Workbooks.Add(xlWBATWorksheet) Set xlWs = xlWB.Worksheets(1) Set xlRng = xlWs.Range("A1") For I = 0 To rst.Fields.Count - 1 xlRng.Offset(, I).Value = rst.Fields(I).Name Next I xlRng.Offset(1).CopyFromRecordset rst rst.Close Set rst = Nothing Set xlRng = xlWs.UsedRange With xlRng .Font.Name = "Verdana" .Font.Size = 8 With .Borders .ColorIndex = xlAutomatic .LineStyle = xlContinuous .Weight = xlThin End With With .Rows(1) .Font.Bold = True .Interior.ColorIndex = 15 End With .WrapText = False .EntireColumn.AutoFit End With xlWB.SaveAs strXLFileName, True xlApp.Visible = True Set xlApp = Nothing End Sub