Results 1 to 3 of 3
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Web support on-a-stick (Excel/XP et al)

    Edited by HansV to correct link to post (it should be <!t>[post=description,number]<!/t>, not <!t>[post=number,description]<!/t>)

    The attached workbook contains "ThisWorkbook" and "HelpWeb" modules.
    If I've coded it right, no matter if the user deletes the command button from the toolbar, or the toolbar itself, the darn thing will re-generate the next time the workbook is opened.
    By design, therefore, The user will always have my web site as a channel for help. No excuses.

    I'd love to clear up two major points (apart from any comments on my coding)

    1) ref <!post=Private Sub Excecution,158325>Private Sub Excecution<!/post>, I'd love to be able to tuck all this code into ThisWorkbook, rather than have some in a module. I've played with it this afternoon, but can't see how to do it. I believe that the "Workbook_Activate" part of the code must stay in ThisWorkbook, but the command button can't find my macro "chrisgreavescom" when I place it in the "Workbook_Activate".

    2) the original workbook had a command bar "Journal", and it keeps rearing its ugly head whenever I load my cloned demo version. I am not sure why, after I have deleted the darn thing, it re-appears.

    I am, as usual, indebted to the lounge for pretty well every line of code, except for those that begin with a leading quote-character.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Web support on-a-stick (Excel/XP et al)

    1. You could attach the toolbar to the workbook (but then, the user would be able to delete it)
    2. The user can open the workbook and disable macros (if macro security is set to Medium) - your toolbar will not be created then.
    3. You can't and shouldn't put all code in ThisWorkbook. ThisWorkbook acts like a class module and is much harder to debug than a standard module. You could put your macro chrisgreavescom in ThisWorkbook, though. You must set the OnAction property of your toolbar button to "ThisWorkbook.chrisgreavescom".
    4. You should delete the MyApplication toolbar when closing the workbook, so that users will only see it when your workbook is open.

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Web support on-a-stick (Excel/XP et al)

    Hans, thanks for the response.
    (1. & 2.) True. There's an ulterior motive behind my efforts: I wanted to distribute an application, and I figure that some users will distribute it without my knowledge. Not a big deal, but I'd like to be known as the author. I figured that a button of some sort, some where, that identified my web site would provide an innocuous channel back to me. ("Hey! I got a copy of your application. Great tool! Can I ....?") My UserForms (GUI) can carry a label with a link to www. I reasoned that if there is no mandatory GUI form, a toolbar was the next best thing. Since the user doesn't have to go through the toolbar to execute the application's end-user macros, I figured on making sure, on entry, that the toolbar was there, re-creating it if it had been deleted. (I have since added a line to force visibility). That seems to be an innocuous way of letting any user know that it's my product, and can't be passed off or distributed as someone else's product.

    (3.) I have put my "chrisgreavescom" in ThisWorkbook as you suggested, and made it private. I'm not sure that that doing so gives me any extraa level of protection, since in a locked workbook, the user can't modify the code anyway, and so can't get to the document events and Private Subs in the first place.

    4. This too I have done. Thanks. In my eagerness to test the thing, I ignored "tomorrow"!

Posting Permissions

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