Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Aug 2001
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Mouse Cursor during macros (2000)

    In the macro I created, which involves userforms. the cursor is always the hourglass. It only does this on certain machines. Is there anything I can do about this?

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

    Re: Mouse Cursor during macros (2000)

    When you say the cursor is always the hour glass, do you mean the userform is locked up and not responding.

    It would be impossible to know what can be done without more details or possibly a sample of the userform and the code behind it. If it is feasible to post a workboo with the userform and code it would help. You could remove/replace sensitive data.

    Andrew C

  3. #3
    Star Lounger
    Join Date
    Aug 2001
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mouse Cursor during macros (2000)

    I'm sorry I wasn't more descriptive. The cursor is the hourglass, but I can run the userforms per usual. It's just I'm clicking all the buttons with the hourglass icon. When i Alt-tab to another app and alt-tab back, it's gone. Hmm. Furthermore,

    - what was the code to set focus again, on a textbox?
    - how do i bypass the "are you sure" question that excel asks when i delete a worksheet via macro?

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

    Re: Mouse Cursor during macros (2000)

    Kevin,

    Sorry but I can't really say much about the cursor problem, except to ask more questions. : Does it only happen when the userform is on view, does it happen on more tha one machine, and are you using any code to change cursors etc ?.

    to set the focus to a control, you wouls use ControlName.Setfocus, for TextBox1 that would be TextBox1.SetFocus

    Try

    Application.DisplayAlerts = False

    before deleting the sheet, and reset with

    Application.DisplayAlerts = True

    when complete.

    Andrew

  5. #5
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mouse Cursor during macros (2000)

    Since someone answer the question about not displaying the alert dialog on worksheet deletion, I'll answer the cursor one.

    Application.Cursor = xlDefault

    This will set the cursor to its default type <img src=/S/doh.gif border=0 alt=doh width=15 height=15>

    If your app isn't really busy (which the hourglass of course usually means), then your code may be changing the cursor on purpose (I do this sometimes as an indictor to the user when I'm processing lots of stuff).

    Setting focus :

    FormA.txtField.SetFocus
    FormA.txtField.SelStart = 0 ' put cursor at first character in text field


    Deb <img src=/S/hairy.gif border=0 alt=hairy width=15 height=15>

  6. #6
    Star Lounger
    Join Date
    Aug 2001
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mouse Cursor during macros (2000)

    The knowledge of the world is contained within this board. Thank you all once again.

Posting Permissions

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