Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Jun 2006
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Digital Signature Removed from VBA Code (2003 (SP3))

    I have the following VBA code on a worksheet that when a button is clicked it unhides this "template" worksheet, makes a copy, and rehides it. The VBA code has a digital signature on it. Since the template that is being copied has VBA code in it as well, it is adding VBA code to the project when a copy is made. Therefore the digital signature gets discarded as designed. Without removing the VBA code on the "template" worksheet, can anyone think of any creative ways to get around this?

    Sheets("Assoc Template").Visible = True
    Sheets("Assoc Template").Select
    Sheets("Assoc Template").Copy After:=Sheets(Sheets.Count)
    Sheets("Assoc Template").Select
    ActiveWindow.SelectedSheets.Visible = False

  2. #2
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Digital Signature Removed from VBA Code (2003 (SP3))

    You could try to copy the cells of the template sheet and then paste the copy onto a new black sheet that is added to the end of the workbook. This may prevent code attached to the template sheet from copying.
    Try:
    Sheets("Assoc Template").Cells.Copy
    Sheets.Add After:=Sheets(Sheets.Count)
    ActiveSheet.Paste
    Range("A1").Select



    PS: You can shorten the orig to this too:
    Sheets("Assoc Template").Copy After:=Sheets(Sheets.Count)
    Sheets(Sheets.Count).Visible = True
    Regards,
    Rudi

  3. #3
    Star Lounger
    Join Date
    Jun 2006
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Digital Signature Removed from VBA Code (2003 (SP3))

    I understand what you're saying. I'll try playing with this a bit to see if it will work. Thanks for the quick response!

Posting Permissions

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