View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dick Kusleika[_4_] Dick Kusleika[_4_] is offline
external usenet poster
 
Posts: 595
Default RowLiner addin How to Start and Stop

I think Chip uses the password 'a' to keep windows from opening in the VBE.
You might try that password. If it works, I'm sure he didn't intend to keep
you from looking at the code. If it doesn't work, then he probably did.

Andrew's Excel Tips has a similar add-in that you may find useful
http://www.andrewsexceltips.com/cell_spotter.htm

I've run into a few errors with that add-in, but the code is wide open.

--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-blog.com

wrote:
I struggled with finding an method of highlighting a range in the
active cell's row. I've looked around and was not able to find some
sample code that would provide this feature. However I did find Chip
Pearson's
www.cpearson.com RowLiner that would do the job just fine.
However his code is password protected and I'm not able to add it to
my module.

When his program is installed it slows the processing down of my
subroutine and ignores my Application.ScreenUpdating = False.

If I turn it off manually, run my calc sub and then turn it back on it
works great and my screen updating is off so the calc runs faster.

Several people at multiple sites will be using my pogram and the
rowliner addin I need a way to check to see if the RowLiner.xla is
installed. If it is not it needs to install it from a shared folder
S:\EZ-Rack\RowLiner.XLA.

Once it's installed I don't want it turned on until after my calc sub
runs. Then I want it to turn on.

I also want to turn it off when I run a sub to sort the data.

Here's some code I've found and have tried to peice it all together
and I needs some help making it work.

Sub InstallAddin()
Dim objExcel As Excel.Application
Dim WbMyAddin, lastError

'On Error Resume Next ' turn off error checking
Set WbMyAddin = Workbooks(AddIns("S:\EZ-Rack\RowLiner").Name)
Set objExcel = New Excel.Application
' not sure if this is correct
Set WbMyAddin = Workbooks.Open(AddIns("S:\EZ-Rack\RowLiner").FullName)

If AddIns("RowLiner").Installed = True Then
MsgBox "RowLiner add-in is installed and turned on"
Else
MsgBox "RowLiner add-in is not installed. Installing from
S:\EZ-Rack\RowLiner.XLA"
' the add-in workbook isn't currently open. Manually open it.
Set WbMyAddin =
Workbooks.Open(AddIns("S:\EZ-Rack\RowLiner").FullName)
'turn off RowLiner addin until ready to turn on. (not sure how to
do all of this)
AddIns.Add("RowLiner").Installed = False
End If

Sub StartAddin()
objExcel.AddIns.Add(Application.Path & "\RowLiner.xla",
True).Installed = True
End Sub

Sub StopAddin()
objExcel.AddIns.Add(Application.Path & "\RowLiner.xla",
True).Installed = False
End Sub