+ Reply to Thread
Results 1 to 3 of 3

RowLiner addin How to Start and Stop

Hybrid View

  1. #1

    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


  2. #2
    Dick Kusleika
    Guest

    Re: 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.

    --
    **** Kusleika
    Excel MVP
    Daily Dose of Excel
    www.*****-blog.com

    [email protected] 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




  3. #3
    Chip Pearson
    Guest

    Re: 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





    <[email protected]> wrote in message
    news:[email protected]...
    >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
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1