Results 1 to 6 of 6
  1. #1
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Ouput Worksheet Problem (Excel 2002/2003)

    What kind of buttons? From the Forms toolbar or from the Control Toolbox?

  2. #2
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Ouput Worksheet Problem (Excel 2002/2003)

    Hi Hans

    On some sheets there are both.

    Regards

    Braddy
    If you are a fool at forty, you will always be a fool

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

    Re: Ouput Worksheet Problem (Excel 2002/2003)

    Insert the following lines immediately below the line with PasteSpecial (and above Next wsT):

    For i = wsT.Shapes.Count To 1 Step -1
    If wsT.Shapes(i).Type = msoFormControl Then
    wsT.Shapes(i).Delete
    End If
    Next i
    For i = wsT.OLEObjects.Count To 1 Step -1
    wsT.OLEObjects(i).Delete
    Next i

  4. #4
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Output Worksheet Problem (Excel 2002/2003)

    Hi

    Attached is code very kindly supplied to me by Hans. It works brilliantly however it also outputs any buttons on the sheet, when pressed in the copy it goes into debug and you can see the passwords.

    Is it possible to modify this code so that it only copies the cell data and not the button objects.

    Many Thanks in advance.

    Braddy
    If you are a fool at forty, you will always be a fool

  5. #5
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,832
    Thanks
    136
    Thanked 484 Times in 461 Posts

    Re: Ouput Worksheet Problem (Excel 2002/2003)

    Whenever I'm copying stuff using VBA and don't want any buttons etc. included, I make use of..
    Application.CopyObjectsWithCells = False

    (I can check current setting and then return it to the previous setting if required).


    zeddy

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

    Re: Ouput Worksheet Problem (Excel 2002/2003)

    Great tip, thanks! Somehow, this option has always escaped my attention.

Posting Permissions

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