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.
Dim wsClient As Worksheet Dim wkbClient As Workbook Dim wkbThis As Workbook Dim pivotdate As String Sub PivotN() 'start code Set wkbThis = ThisWorkbook ' Open Client Workbook Set wkbClient = OpenWorkbook(True) ' Set wkbClient = OpenWorkbook1() LetsPivot ' calls pivot table sub pivotdate = wkbClient.Sheets("Dec2013").Range("A2").Value MsgBox ("Pivot Table Complete [" & pivotdate & "]. Data copied. Now paste.") If wkbClient Is Nothing Then MsgBox "No valid workbook has been provided, Exiting..." Exit Sub Else ' If we know the worksheet name ' clientWSName = "Foglio1" ' Find the client worksheet by name ' Set wsClient = wkbClient.Sheets(clientWSName) ' This assumes the client worksheet is the first If (wkbClient.Worksheets.Count > 0) Then Set wsClient = wkbClient.Worksheets(1) Else MsgBox "Unable to process - no worksheet available" Exit Sub End If If (wsClient Is Nothing) Then MsgBox "Null client worksheet..." Exit Sub Else ' MsgBox "Got a client worksheet: " & wsClient.UsedRange.Count End If End If End Sub ' Function to open a workbook using the File Dialog Public Function OpenWorkbook(mode As Boolean) As Excel.Workbook Dim sFile As String Dim ShortName As String Dim autoSecurity As MsoAutomationSecurity Set OpenWorkbook = Nothing Dim wkb As Workbook autoSecurity = Application.AutomationSecurity Application.AutomationSecurity = msoAutomationSecurityForceDisable With Application.FileDialog(msoFileDialogFilePicker) .AllowMultiSelect = False .Filters.Clear .Filters.Add "Excel Files", "*.csv" .FilterIndex = 1 .Title = "Please Select File to open" If .Show = False Then Exit Function sFile = .SelectedItems(1) End With ShortName = Right(sFile, Len(sFile) - InStrRev(sFile, "\")) If CheckSourceAvailability(ShortName) Then Workbooks(ShortName).Close End If Application.EnableEvents = False If (mode) Then Set wkb = Workbooks.Open(sFile, ReadOnly:=True, UpdateLinks:=0) On Error GoTo 0 Else Set wkb = Workbooks.Open(sFile) End If Application.EnableEvents = True Set OpenWorkbook = wkb Debug.Print OpenWorkbook.Name clientFileName = sFile Application.AutomationSecurity = autoSecurity errOpen: If (Err.Number > 0) Then MsgBox "Error: " & Err.Description & "ErrNo: " & Err.Number End If End Function Public Function CheckSourceAvailability(sWorkBook As String) As Boolean Dim wb As Workbook, bResult As Boolean bResult = False For Each wb In Application.Workbooks If InStr(LCase(wb.Name), LCase(sWorkBook)) > 0 Then bResult = True Exit For End If Next wb CheckSourceAvailability = bResult End Function Sub LetsPivot() Const SourceSheet As String = "" Const PivotName As String = "PivotN" Const TargetCell As String = "A1" Const ColumnCaptions As String = "Date" ThisWorkbook.ShowPivotTableFieldList = False End Sub
|VB Script: Drill down in order to get the most recent folder in a Root folder and most recent file in the folder||3||18|
|I need help with an EXCEL Nested formula.||5||20|
|Set the row height to autofit in all workshets and increase that height by 4 points (by means of VBA)||9||30|
|VBA - Transfer values from Master wb to all wbs. Delete old data, copy new data from master wb to user wbs located in a folder.||3||15|