Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Well unless you want to control the autofill with a macro (select first cell
then an inputbox or userform will ask for the autofill range and settings), I do not see any event that could relate to this function. Even the worksheet_change event happens too late. The only way I see is to use the worksheet_selectionchange event and to select the range before you use the autofill: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim a As Range, message As String message = "The range you have selected contains hidden cells!" If IsArray(Target) Then For Each a In Target If a.EntireRow.Hidden = True Then MsgBox message, vbExclamation, "" Exit Sub End If Next End If End Sub <<<<<<<<<<<<<<< "atledreier" wrote: I have a filtered sheet. Sometimes I would want to autofill data in this sheet, but doing so would overwrite the hidden rows with filled data as well. I've accidentaly done this twice now, and don't want to make it a third. What I need is to check if the autofill range contains hidden rows and then prevent the autofill, or some other clever way to prevent the hidden data being overwritten. I've thought to use a worksheet_change event and then check if the range contains hidden rows, but this seems very inefficient. This is Excel97, btw. -Atle |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
opening a group but keep hidden rows hidden | Excel Discussion (Misc queries) | |||
Hidden rows columns won't stay hidden | Excel Worksheet Functions | |||
Rows hidden by Autofilter vs hidden by changing the Hidden property | Excel Programming | |||
I need my Hidden Rows to stay hidden when I print the sheet. | Excel Discussion (Misc queries) | |||
Cell selection with hidden rows | Excel Programming |