De: Venkata Objet: Re: Autofill x Hidden cells -- Need Help !!!!! Date : mardi 31 août 1999 18:02 Bruno I don't know if this is the right solution but I am giving it. My suggestion is that, the autofill should be done through a macro which can be as follows Public Sub filldown() dim temprange As range, cel As range, i As Integer set temprange = Columns(30).resize(selection.rows.count) selection.Copy temprange if activecell.Row < selection.rows(selection.cells.rows.count).Row then temprange.range("A1:A2").AutoFill temprange Else temprange.range("A1").AutoFill temprange end if for each cel In selection.Specialcells(xlCelltypeVisible) i = i + 1 cel.value = temprange.cells(i) next temprange.Clearcontents end Sub The macro uses the column 30 as a temporary area where the original values are copied to, autofilled and then copied back to original place only into visible cells. Since the column 30 contents will be cleared after use, the user will not even know that a temporary work area is being used. First you select the autofill range and then run this macro. if the selection is from top to bottom so that active cell is at top of selection, then the fill down will be assumed based on top 2 cells. if the user makes the selection from bottom to top so that active cell at the bottom of selection before running the macro, the fill down will be done based on top 1 cell only. Based these concepts, you can customize the macro and include special cases handling and error handling. if you want you can redirect the menu item - Edit | Fill | down of Menu bar towards your macro as follows (might be you can put this in Workbook_open event) CommandBars("Worksheet Menu Bar").Controls("&Edit").Controls("&Fill").Controls("&down").OnAction = "Filldown" with this user can directly run your macro from the menu bar Let me know if it was OK Regards Venkata Krishna Bruno Resende Soares wrote in message news:37CBCEE4.FA016C49@construtel-sti.com.br... > Hi, > > I'm working with Excel 97 and when a user makes an autofill on my > application, I need to execute this only on the visible cells, hidden > cells must to continues with the original value. Anyone has an idea ? > > Ps. I tryed to use selection_change event but when this event is fired, > I dont't have the original value of the hidden cell to change it back. ( > I have only the new value ) > > Thanks, > > Bruno >