+ Reply to Thread
Results 1 to 14 of 14

Fixing position of Userform

  1. #1
    Forum Contributor
    Join Date
    02-03-2009
    Location
    Doha, Qatar
    MS-Off Ver
    Excel 2010
    Posts
    132

    Fixing position of Userform

    Hi,
    In the attached excel sheet, i had got it solved by royUK.
    All i want to know is that.
    If i want Cell C1 to keep blinking to draw users attention when excel is opened, what do i need to do.

    Secondly the User form (Key)always appears the centre of the page. If i want this to be always fixed between rows 1 and 3 soemwhere near D2 to H2. How can i make it fixed in its location
    Thnks
    Max
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    Re: Fixing position of Userform

    hello maximpinto,

    1st, cell blink, Take a look at http://www.vbaexpress.com/kb/getarticle.php?kb_id=891 this explains in full how to achive this.

    2nd you where nearly there with the position of the userform.
    try this, you will need to adjust the left and top propties to suit your needs.
    Please Login or Register  to view this content.
    hope this helps.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Fixing position of Userform

    Chip Pearson provides a way to fix the start up position
    The attached example blinks B1 when A1 is changed.
    Attached Files Attached Files
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Contributor
    Join Date
    02-03-2009
    Location
    Doha, Qatar
    MS-Off Ver
    Excel 2010
    Posts
    132

    Re: Fixing position of Userform

    Dears Many thanks for your response,

    RoyUK- I want the cell to blink when it is opened itself and not based on any condition. How can i tune this code to get that.

    D-Rennie-I tried using your code to fix position but no change it still stays in centre.
    Thanks
    max

  5. #5
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    Re: Fixing position of Userform

    hello maximpinto

    The code that i put in the 1st post works for 2007 though things may be diffrent for 2003. Though Is a userform realy nessary for this, Why not just take a screenshot of it trim of the excess and insert it as a image on the sheet ifself.
    Though if you want to stick with the userform and move it to a desired display location. cheek one of the two links out.

    This will make the cell blink when the sheet is activated.
    Please Login or Register  to view this content.
    ps did you copy and paste the comptete code when trying my example for location. Cos the .StartUpPosition = 0 needs to be 0, Though this is a cheep workaround for fixing it. There are great examples in the link provided by roy.

    hope this helps.

    Hope this helps

  6. #6
    Forum Contributor
    Join Date
    02-03-2009
    Location
    Doha, Qatar
    MS-Off Ver
    Excel 2010
    Posts
    132

    Re: Fixing position of Userform

    Dear Rennie,
    Thanks for your inputs. I am using 2007.
    Well i have attached my sheet. I have also place the image, but stil want to see if the userform attributes work. IF not i will retain the image
    The cell blink i am not able to get it, can you please help me with this sheet
    I want cellB2 to blink. I need this urgent
    Thanks
    max
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    02-03-2009
    Location
    Doha, Qatar
    MS-Off Ver
    Excel 2010
    Posts
    132

    Re: Fixing position of Userform

    Daer Rennie,
    I tried out with placing that code, but the only problme is it will not start blinking as soon as the sheet is opened but will only blink when i run the macro manually
    How can i make it start automatically when the sheet is active
    thanks
    max
    Attached Files Attached Files

  8. #8
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    Re: Fixing position of Userform

    Hello.

    I have attached a workbook that gets the cell to flash when the workbook is opened, also when the sheet October is activated. you have a few lines that need the sheet name to run eg
    Please Login or Register  to view this content.
    And im guessing that you will end up with 12 sheets in the workbook one for each month. hard coding the name like this IMO is the wrong approach.
    Instead ive put together V2 that will cheek the B2.value and if it is not = "Select a team from the cell below " it wont make the cell blink.

    And as for the userform. IMO it looks a lot cleaner withough the use of the userform.

    Hope this helps.
    let me know how it goes.
    Attached Files Attached Files

  9. #9
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Fixing position of Userform

    The form position code posted should work with any version, but for accurate positioning you need Chip Pearson's solution.

    If you put this code into the WorkBook_open event, the cell will flash
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    02-03-2009
    Location
    Doha, Qatar
    MS-Off Ver
    Excel 2010
    Posts
    132

    Re: Fixing position of Userform

    Hi Roy,
    I put this code at the said location but still not wroking.
    I want to know where in code do we say the cell i want to flash is B2.
    Thanks
    max
    Attached Images Attached Images

  11. #11
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    Re: Fixing position of Userform

    have you looked at the example
    File Type: xls maximpinto_V2.xls (188.0 KB, 1 views)
    The screenshot you posted shows two anbugius names private sun Workboook_open()
    copy the lines inbetween the top sub workbbok_open() ..... end sub
    and insert them into the other private sub Workbook_open()
    delete the 1st private sub Workbook_open()

    also in the maximpinto_V2.xls module1 codeing things have been slightly changes that could better suit your need.
    Please Login or Register  to view this content.
    Last edited by D_Rennie; 10-05-2009 at 11:59 PM.

  12. #12
    Forum Contributor
    Join Date
    02-03-2009
    Location
    Doha, Qatar
    MS-Off Ver
    Excel 2010
    Posts
    132

    Re: Fixing position of Userform

    Hi Rennie,
    I had checked the work book(maximpinto_V2.xls), and the problme was it was blinking but stops after 3 blinks and the text is not to be shown forever.

    I pasted your code but gives compile error at this point regarding Workbook_open

    " Application.OnTime RunWhen, "'" & ThisWorkbook.Name & "'!StartBlink", , False"


    Thanks for all your time
    Thanks
    max

  13. #13
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Fixing position of Userform

    Attach the workbook

  14. #14
    Forum Contributor
    Join Date
    02-03-2009
    Location
    Doha, Qatar
    MS-Off Ver
    Excel 2010
    Posts
    132

    Re: Fixing position of Userform

    Hi Roy,
    With what you and Rennie supported i am thankful.
    I have attached the sheet.It seems to work fine now.

    But one thing is that, here i have used about 7 conditional formatting with 7 colors but when a user with office 2003(excel 2003) opens he is not able to view the coloring.
    Any workaround to solve this please do let me know
    Thanks
    max
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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