LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 542
Default creating an excel add-in

I know how to create and save simple add-ins but this one is a bit more
extensive and it involves more than just the regular module. I do not know
how to turn this Macro into a add-in or if it is even possible. Any help
would be grateful.

'This is the code in the workbook
Private Sub Workbook_Open()
Call TurnOnEvent

End Sub
__________________________________________________ __


'This is the code that is in Module1
Public bEnable As Boolean
Dim myobject As New Class1
Sub TurnOnEvent()
Set myobject.appevent = Application

End Sub



Public Sub RowHighlighter()
If Not bEnable Then
bEnable = True
Else
bEnable = False
End If
End Sub
__________________________________________________ ______________

'This is the code that is in the Class Module (Class1)
Option Explicit

Public WithEvents appevent As Application

Private Sub appevent_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
Static Old As Range
Static colorindxs(1 To 256) As Long
Dim i As Long
If bEnable Then
If Not Old Is Nothing Then
With Old.Cells
If .Row = Target.Row Then Exit Sub
For i = 1 To 256
.Item(i).Interior.ColorIndex = colorindxs(i)
Next i
End With
End If
'Set Old = Cells(Sh.ActiveCell.Row, 1).Resize(1, 256)
Set Old = Cells(Target.Row, 1).Resize(1, 256)
With Old
For i = 1 To 256
colorindxs(i) = .Item(i).Interior.ColorIndex
Next i
.Interior.ColorIndex = 36
End With
End If
End Sub


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a new chart in Excel WWoods Charts and Charting in Excel 1 May 27th 08 07:53 PM
Creating charts in Excel... [email protected] Excel Discussion (Misc queries) 1 July 2nd 06 06:42 AM
Creating an Excel TOC Brad Excel Worksheet Functions 4 August 11th 05 11:05 PM
after creating macro button, closed excel then restarted excel hjd43 Excel Discussion (Misc queries) 1 March 3rd 05 03:04 AM
Creating a US map in Excel carlotta Excel Discussion (Misc queries) 0 December 7th 04 04:23 PM


All times are GMT +1. The time now is 03:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"