Posts by Egad

    Select all cells in the worksheet and click on Format-Cells-Protection and check the Locked box.
    Select the cells to be unprotected and click on Format-Cells-Protection and uncheck the Locked box.
    Then click on Tools-Protection-Worksheet to protect the sheet.

    Hi guys can you help me with this one? I'm not too familiar with com addins.


    It's a question from someone that I referred to Ozgrid, but instead of posting sent me a U2U instead.
    I told him how helpful and friendly the board is so our rep is on the line. :)
    Much appreciated, Doug


    (I'll let him know about this thread).


    --------
    Running vba code in Com Addin DLL
    Message: I am trying to turn my vba xla addin into a Com Addin DLL , for better code security. I purchased Microsoft XP Developer for the Addin Designer feature. I installed a button on the excel tool bar, with the following code in the Add-in Designer module under Excel.
    The COM Addin compiles and installs...the msgboxes work. However, I can't run simple vba subroutines from MyButton such as the one below this code, which creates a new test worksheet in a new workbook. I keep getting a Run-Time error-2147417846 decimal 8001010a hexidecimal. I unstalled Norton AV plug-ins, however, still get the error.


    What code/structure changes are needed to do this?


    CODE IN ADD-IN DESIGNER***************************


    END OF CODE IN WORKBOOK_OPEN**************************

    Yes, you would have to use Ralph's approach, but instead of unprotecting then protecting the sheet again you could use:
    activesheet.Protect Password:="password", userinterfaceonly:="True"


    at the top, it will allow macros to run without the dangers of temporarily unprotecting the sheet.

    I was in Toronto when it hit. The subways were affected so I had to join the crowds and walk 3 hours out of downtown to get home. 24 hours later the power was still off so we decided to start our trip early. Power was back on in the NE USA so we had no travel problems.
    With power off we had quite a view of the evening sky in Toronto. Amost as many stars as I've seen DeepInaHeartofTexas.

    More info:
    The worm corrupted my friend' Windows apps including Explorer, Access, Word, Excel. Many functions including cut & paste operations resulted in error messages & hangs.

    A friend & his co-workers also started having problems yesterday with corrupted apps. The bank he works for is infected with the blaster worm. :mad:
    You may want to try the http://www.symantec.com/ removal tool.
    This may not be the culprit in your case but its worth a look.

    Do you need live links? They really slow down calculation times. Would you consider importing the values only and updating them when the macro is run?


    After each created link you could add this code:
    Cells(ActiveCell.Row, 61).copy
    Cells(ActiveCell.Row, 61).PasteSpecial Paste:=xlValues

    You should also try changing "activecell.row" to "cell.row" or even just "cell". There is nothing in the code that changes the activecell. The value of "cell" changes in the loop from 1 to 500 but your code does not physicaly move the cursor (the activecell) -and there is no need for excel to physically move the cursor - moving the cursor just slows down the code.