+ Reply to Thread
Results 1 to 3 of 3

REfocus on userform after print command within the userform

  1. #1
    Forum Contributor
    Join Date
    12-14-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    106

    REfocus on userform after print command within the userform

    Hi

    I have a userform that allows me to enter data in text boxes and listboxes and when I press a command button for next it allows to to enter the next persons data. THis works fine and after pressing next it refocuses on the top input listbox.

    I added a print command in for when I click next and now it no longer refocuses on my first list box.

    Any ideas how to solve this would be gratefully received. Code is

    Please Login or Register  to view this content.
    Cheers

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: REfocus on userform after print command within the userform

    I had a similar problem. The focus does NOT seem to be set 'for me' unless there is more than one 'SetFocus' call. I don't know why. I make a dummy call to set the Focus on a different UserForm Control, before I set the Focus on the control I want.

    Try:
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    12-14-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: REfocus on userform after print command within the userform

    Hi LJ

    MAny thanks for your solution. Worked a treat. Never would have considered that.

    Chris

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Open a userform from a userform, but preserve the info in the original userform
    By jfoerch in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-25-2013, 02:38 PM
  2. [SOLVED] EXCEL USERFORM- Unable to print spreadsheet using command button
    By PANTECH in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 04-19-2013, 10:26 AM
  3. Userform Command Button to open new userform
    By JamesT1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-08-2010, 12:02 PM
  4. userform is large.....how to use scrollbar of userform to show all of the userform
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-05-2010, 04:11 PM
  5. Print a PDF document from Userform Command Button
    By msommerf in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-20-2009, 12:38 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1