View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_5_] Jim Thomlinson[_5_] is offline
external usenet poster
 
Posts: 486
Default How to add a public subroutine to a class module

I am not really following... Classes have methods which operate on objects
(which are instances of the class). Why not just add a module and place your
sub in that module. The code you posted does not make me think you are trying
to operate on the object you are creating.
--
HTH...

Jim Thomlinson


"keithb" wrote:

I have an add-in containing a class module that is used by a large group of
different spreadsheets. How can I add the following subroutine to the clas
module in a way that it can be called by the individual spreadsheets using a
keypress?

Public Sub shiftRight()
With Selection
.InsertIndent -1
End With
End Sub

Thanks,

Keith