Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a giant spreadsheet of server information using autofilters for the
columns. One of the uses I have for this spreadsheet is for performing repetitive tasks by using a macro that is manually activated once I have a range of server names selected. When the macro is activated, it takes the selected range of server names and writes them to a text file that is later called from a batch file. The only problem is that filtered (hidden) rows are being included in the selection. Is there a way to prevent this in code? Here is my code that handles the server name selection: Sub WriteFile() Dim OutputFile As String OutputFile = "C:\scripts\selection.txt" Dim myRange As Range Set myRange = Selection Open OutputFile For Output As #1 For Each rngCell In myRange.Cells inhalt = Cells(rngCell.Row, rngCell.Column).Value Print #1, inhalt Next rngCell Close #1 ServerTool.Show vbModal End Sub Thanks in advance, Scott |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
selecting the first row after a filtered range | Excel Programming | |||
prevent row insert in a range of rows | Excel Programming | |||
Selecting Column of Visible AutoFiltered Cells. | Excel Programming | |||
Selecting autofiltered cells | Excel Programming | |||
Selecting Filtered Items from Named range | Excel Programming |