View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Macro has stopped working!!!

Remove the single apostrophe from in front of each line of code.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"PG Oriel"
wrote in message
Hi, I have the following code which is meant to hide columns where there is
no data in certain columns. It used to auto update but it stopped working so
I tried attaching it to a button but it too has stopped working. Any idea
why? The system works by have pupils names in column B, class in column C and
levels of behaviour on column C onwards, starting in row B for my first set.
I want it to autofilter and then hide columns where there is no information
for any column from C onwards for a class. eg. Column D and Column F might
be empty for Class 7P which occupy rows 37-65 etc.

-snip-

'Private Sub Worksheet_Calculate()
'If Me.AutoFilterMode Then
'ABC
'Else
'Columns.Hidden = False
'End If
'End Sub

'Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'If Me.AutoFilterMode Then
'ABC
'Else
'Columns.Hidden = False
'End If
'End Sub