• WSRuff_Hi

    WSRuff_Hi

    @wsruff_hi

    Viewing 3 replies - 826 through 828 (of 828 total)
    Author
    Replies
    • in reply to: Feedback from dialog boxes #524410

      Ok, now I am going to be really detailed. I have a user form that contains a list box and two command buttons (one cmdOK and one cmdCancel).

      This form gets displayed right at the beginning of a macro to give the user a choice of paths (the list box contains a list of several paths). The user can select a path, click Ok (the path form gets hidden) and then the macro saves a file to the selected path. If the user clicks Cancel, the form still gets hidden but how do I know that cancel has been clicked.

      What I have done is create another label (lblResult) that is invisible. If the user clicks Ok, the .enable property is set to TRUE, if the user clicks Cancel, the .enable property is set to FALSE.

      In this way I can do the following:

      frmPath.lblResult.enable = TRUE
      frmPath.show

      if not frmPath.lblResult.enable then goto TheEnd

      My original question (with maybe not enough details) was is there a better way?

      Cheers,

      Tim

    • in reply to: Feedback from dialog boxes #524372

      OK, maybe a bit more info will help. I’m fine with inputbox and msgbox …

      x = inputbox()
      if x = “” then goto TheEnd

      if msgbox(“blah blah blah”, vbyesno) = vbno then goto TheEnd

      … but it is USERFORMs that cause me the worry.

      Sorry about the confusion.

    • in reply to: Sheet Name in .address #515814

      Of course!

      I was using ‘refersto’ to set the range name via the macro, I just didn’t think that it would be a readable property as well.

      Now, all I need to use it in ‘range().value’ is strip the “=” out – easy.

      Thanks all for you help (and the speed!!)

    Viewing 3 replies - 826 through 828 (of 828 total)