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.
Private Sub CommandButton1_Click() Dim FileLength As Long Dim FileCount As Long Dim Cell As String Dim FileRange As String Application.ScreenUpdating = False Sheets(2).Select FileLength = ActiveSheet.UsedRange.Rows.Count + 1 'cell counts the number of linse that need to be copied to word. FileRange = ActiveSheet.[O1].Text 'target cell contains a formula to compose range (= "A3:D" & I1) the result would be something like A3:D463 FileCount = 3 Sheets(3).Select Sheets(3).Range("B:D").Select Selection.Copy Sheets(2).Select Sheets(2).Range("A:A").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False For I = FileCount To FileLength Cell = Sheets(2).Range("A" & I).Text Sheets(2).Range("E2:M2").Copy 'contains formulas the will be copied to active rows Sheets(2).Range("E" & I).Select 'selects the next active row Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False 'pastes the formulas Next I Sheets(2).Range("J:J").Select Selection.Copy Sheets(2).Range("D:D").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets(2).Range(FileRange).Select 'this does select the desired range to be sorted 'the code bellow will run if it is run as a stand alone macro. but when added to this script ' it no longer works. Selection.Sort Key1:=Range("D3"), Order1:=xlAscending, Key2:=Range("E3") _ , Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _ False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2 _ :=xlSortNormal end sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.