Results 1 to 10 of 10

Thread: Excel form (97)

  1. #1
    2 Star Lounger
    Join Date
    Oct 2001
    Location
    Suffolk, England
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Excel form (97)

    I have an Excel form with various buttons, some of which only appear when a front button is pressed. I now wish to add some more 'hidden' buttons. The problem is that when I add extra command buttons, they won't become invisible - even though the visible property is set to 'false' and even more strangely, whatever the visible property is set to on the new button becomes the visible property on one of the existing buttons. - What am I doing wrong?

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel form (97)

    Maybe you have indeliberately created buttons with the same names (dunno if that is even possible, but who knows...)?
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel form (97)

    Did you create the new button by duplicating and existing button and end up with two buttons with the same name?
    Legare Coleman

  4. #4
    2 Star Lounger
    Join Date
    Oct 2001
    Location
    Suffolk, England
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel form (97)

    No, I did copy a button that works,then pasted and changed the name of the the problem button, but I have also created a new button from scratch - with the same result!

  5. #5
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel form (97)

    Could you attach the file to a message here? (not when its big <g>).
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  6. #6
    2 Star Lounger
    Join Date
    Oct 2001
    Location
    Suffolk, England
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel form (97)

    Attached is the file - I have had to modify it to remove the data to make the file small enough to send. Pressing the large button should have make all 6 buttons visible, but as you can see, 4 of the buttons are visible anyway!

    Thanks
    Allison
    Attached Files Attached Files

  7. #7
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel form (97)

    I am not sure what goes wrong. What I do see, is that your code seems to refer to a non-existent sheet, XL errors out on:

    Sheets("Delayed transfer of care").Select

    Maybe that has something to do with it?
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  8. #8
    2 Star Lounger
    Join Date
    Oct 2001
    Location
    Suffolk, England
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel form (97)

    The sheet 'Delayed Transfers of Care' is one of the sheets that I deleted to get the file small enough to send - the button for that is fine!

    Allison

  9. #9
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Excel form (97)

    Allison,

    It seems to me that some corruption has crept into the workbook. I think you best bet is to re-create that sheet together with controls in a new workbook. You should be able to copy and paste the code behind the existing sheet and just add the controls and rename them to suit your code. If everything works as want when you switch out of design mode you can try moving the new sheet to the old workbook and see if it works.

    Andrew C

  10. #10
    2 Star Lounger
    Join Date
    Oct 2001
    Location
    Suffolk, England
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel form (97)

    Thanks - I'll give that a go!
    Allison

Posting Permissions

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