Posts by Kyle123

    Re: VBA Code To Grab Multiple HTML Tables From Web Page


    Try this:


    You'll need to add a reference to Microsoft HTML Object Library, I can't get it to late bind properly

    Re: Macros code protection


    I can't believe that you're actually just copy and pasting your responses into each forum without acknowledging any of the people that have made suggestions/referencing the advice you've been given

    Re: Getting Web Data in its proper format


    Norie means that rather than using Internet Explorer, you can use the XMLHTTP object to query the page directly.


    Maybe something like this:

    Re: VBA Excel populate CommandBox with values from SQL


    or maybe:

    Code
    with rs
        .Open "SELECT L.intLaptopID, L.strLaptopName from tblLaptops L, tblUser U, tblUserLaptop LU WHERE L.intLaptopID = LU.intLaptopID AND LU.intUserID = U.intUserID AND U.strUsername = '" & Me.txtReturnName.Value & "' " 
    	cbLoanLaptop.Column = .GetRows() 
        .Close 
    End With

    Re: Foolproof Protection of VBA codes


    I like the approach Roy has, but ultimately all these methods are moot since it takes seconds to view the code in any of them without needing any code.


    Roy's at least makes people scratch their head a bit :)

    Re: Foolproof Protection of VBA codes


    Here is the method I'd seen before:
    1. Save the Excel workbook (.xls) file into an add-in (File > SaveAs.....)
    2. After you have the saved add-in (.xla), close the Excel workbook (.xls)
    3. Double click on the add-in to open it
    4. Press Alt+F11 to access the add-in's vba project
    5. Lock the vba-project with a password
    6. Double-click on the "ThisWorkbook" code module
    7. Press F4 to open the Properties window
    8. Change the "IsAddin" status to FALSE
    9. Return to Excel by Pressing Alt+Q (or close the vbe window)
    10. Go to Tools > Share Workbook
    11. When the dialogue appears, check the box for: (Allow changes by.....)
    12. Press OK to close the Dialogue
    13. When prompted to save, Press OK
    14. Press Ok to accept that "macros cannot be accessed"
    15. You should feel giddy at this point because you just realized what you have
    been missing right under your nose
    16. Verify that the [SHARED] appears in the application title bar
    17. Now save the workbook again as an Add-in (File > SaveAs...) overwriting the
    previous one
    18. Close this Excel workbook without saving the changes (you don't need it)
    19. Test out your newly saved add-in (open it, access the vbe, try to expand
    the project window, you should get the new message "Project is Unviewable"

    Re: Foolproof Protection of VBA codes


    yes, me too, it exhibits the same behaviour that I mentioned before - I'll have a look for that method, I can't remember the steps off the top of my head - but it's not the same method so I'm curious.