![]() |
RowLiner addin How to Start and Stop
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 |
RowLiner addin How to Start and Stop
You can turn the RowLiner's drawing function on and off with VBA
code like Application.Run "Rowliner.xla!EnableDrawing", True ' enable drawing Application.Run "Rowliner.xla!EnableDrawing", False ' disable drawing -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com wrote in message oups.com... 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 |
All times are GMT +1. The time now is 12:46 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com