Consulting

Results 1 to 13 of 13

Thread: How to make the values in larger font for the cells with datavalidation?

  1. #1
    VBAX Regular
    Joined
    Sep 2014
    Posts
    37
    Location

    Thumbs up How to make the values in larger font for the cells with datavalidation?

    Hi All,

    I have used the data validations for some cells n created them as dropdown. The dropdowns shows some names/some values in my proj.
    Now i have to make the values shown in the dropdown in larger font.
    What code shall i write?
    NOTE:my project is having so many such dropdowns, for all of them i have to do.
    I have attached one small doc, to show.

    Thanks n regards,

    Prity
    Attached Images Attached Images

  2. #2
    VBAX Guru mancubus's Avatar
    Joined
    Dec 2010
    Location
    "Where I lay my head is home" :D
    Posts
    2,644
    hi.

    just change the font sizes of the cells with data validation.

    or
        With ActiveSheet.UsedRange.SpecialCells(xlCellTypeAllValidation)
            .Font.Name = "Arial"
            .Font.Size = 16
        End With
    PLS DO NOT PM; OPEN A THREAD INSTEAD!!!

    1) Posting Code
    [CODE]PasteYourCodeHere[/CODE]
    (or paste your code, select it, click # button)

    2) Uploading File(s)
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    Replace company specific / sensitive / confidential data. Include so many rows and sheets etc in the uploaded workbook to enable the helpers visualize the data and table structure. Helpers do not need the entire workbook.

    3) Testing the Codes
    always back up your files before testing the codes.

    4) Marking the Thread as Solved
    from Thread Tools (on the top right corner, above the first message)

  3. #3
    VBAX Regular
    Joined
    Sep 2014
    Posts
    37
    Location
    Hello mancubus,

    where shall i write this code in my excel file?
    Also i am new to VBA.

    actually i added this code in a button control and it dint work for me. Please guide me..

    Thank you
    Prity


    Quote Originally Posted by mancubus View Post
    hi.

    just change the font sizes of the cells with data validation.

    or
        With ActiveSheet.UsedRange.SpecialCells(xlCellTypeAllValidation)
            .Font.Name = "Arial"
            .Font.Size = 16
        End With

  4. #4
    VBAX Regular
    Joined
    Sep 2014
    Posts
    37
    Location
    i am sorry its working...
    Thanks a lot

  5. #5
    VBAX Guru mancubus's Avatar
    Joined
    Dec 2010
    Location
    "Where I lay my head is home" :D
    Posts
    2,644
    you are welcome. pls mark the thread as solved. from thread tools.
    PLS DO NOT PM; OPEN A THREAD INSTEAD!!!

    1) Posting Code
    [CODE]PasteYourCodeHere[/CODE]
    (or paste your code, select it, click # button)

    2) Uploading File(s)
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    Replace company specific / sensitive / confidential data. Include so many rows and sheets etc in the uploaded workbook to enable the helpers visualize the data and table structure. Helpers do not need the entire workbook.

    3) Testing the Codes
    always back up your files before testing the codes.

    4) Marking the Thread as Solved
    from Thread Tools (on the top right corner, above the first message)

  6. #6
    VBAX Regular
    Joined
    Sep 2014
    Posts
    37
    Location
    Hi mancubus,

    I had another 1 question.
    as soon as i click the dropdown(the datavalid cell dropdown) then all the values of dropdown should be in large size. Can we make it?

    Regards
    Prity



    Quote Originally Posted by mancubus View Post
    you are welcome. pls mark the thread as solved. from thread tools.

  7. #7
    VBAX Guru mancubus's Avatar
    Joined
    Dec 2010
    Location
    "Where I lay my head is home" :D
    Posts
    2,644
    not with data validation dropdown.

    try using comboboxes:
    http://www.contextures.com/xlDataVal14.html
    PLS DO NOT PM; OPEN A THREAD INSTEAD!!!

    1) Posting Code
    [CODE]PasteYourCodeHere[/CODE]
    (or paste your code, select it, click # button)

    2) Uploading File(s)
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    Replace company specific / sensitive / confidential data. Include so many rows and sheets etc in the uploaded workbook to enable the helpers visualize the data and table structure. Helpers do not need the entire workbook.

    3) Testing the Codes
    always back up your files before testing the codes.

    4) Marking the Thread as Solved
    from Thread Tools (on the top right corner, above the first message)

  8. #8
    VBAX Regular
    Joined
    Sep 2014
    Posts
    37
    Location
    Ok, thank you mancubus,

    I will try the things present in that link...

  9. #9
    VBAX Regular
    Joined
    Sep 2014
    Posts
    37
    Location
    mancubus,

    Well i am attaching a screenshot.. in some of the columns, with the data validated cells, the values r shown so clearly. but in some of the columns, the cells with data validation- the values in the dropdoen are so small.

    Actually this project was already done, n i am a new resource to this project.

    NOTE: u can see the attachment, 1st dropdown is showing small size words, and 2nd is showing big size words

    Thanks in Advance
    Prity

    Quote Originally Posted by Prity View Post
    Ok, thank you mancubus,

    I will try the things present in that link...
    Attached Images Attached Images

  10. #10
    VBAX Guru mancubus's Avatar
    Joined
    Dec 2010
    Location
    "Where I lay my head is home" :D
    Posts
    2,644
    what is it?

    data val or ws combo?

    if combo did you check the link, ie contextures?

    what code you have in the modules?
    PLS DO NOT PM; OPEN A THREAD INSTEAD!!!

    1) Posting Code
    [CODE]PasteYourCodeHere[/CODE]
    (or paste your code, select it, click # button)

    2) Uploading File(s)
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    Replace company specific / sensitive / confidential data. Include so many rows and sheets etc in the uploaded workbook to enable the helpers visualize the data and table structure. Helpers do not need the entire workbook.

    3) Testing the Codes
    always back up your files before testing the codes.

    4) Marking the Thread as Solved
    from Thread Tools (on the top right corner, above the first message)

  11. #11
    VBAX Regular
    Joined
    Sep 2014
    Posts
    37
    Location
    Hi mancubus,

    I am checking the link contextures.
    I have used data validation for the cell. no combo box.
    Actually they have not written any code in the moduoles for this issue. just now i cread a sample application, with the table.
    in sheet1 i created - i did datavalidation for a cell. and this cell contains the value of a table present in sheet4, here is the range i set for the cell with data validation.
    =Sheet4!$C$2:$C$332
    The same code is present in the excel application whose screen shot i added, i dont know why its looking so messy.
    I wanted to share that excel file, but dont think so i will be able to attach it over here.

    Help me out

    Thanks in advance
    Prity

    In our application also they have referred to the table present in some other sheet.

  12. #12
    VBAX Guru mancubus's Avatar
    Joined
    Dec 2010
    Location
    "Where I lay my head is home" :D
    Posts
    2,644
    delete all data validation
    click developer tab.
    clieck Insert button in Controls grup
    click Combobox from Activex controls
    insert combobox in desired cell
    right click combobox, click Properties
    click ... in Font, then select desired font name and size
    click ListFillRange and insert Sheet4!$C$2:$C$332

    repeat these steps for all 'former' data validation cells.

    that's it.
    PLS DO NOT PM; OPEN A THREAD INSTEAD!!!

    1) Posting Code
    [CODE]PasteYourCodeHere[/CODE]
    (or paste your code, select it, click # button)

    2) Uploading File(s)
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    Replace company specific / sensitive / confidential data. Include so many rows and sheets etc in the uploaded workbook to enable the helpers visualize the data and table structure. Helpers do not need the entire workbook.

    3) Testing the Codes
    always back up your files before testing the codes.

    4) Marking the Thread as Solved
    from Thread Tools (on the top right corner, above the first message)

  13. #13
    VBAX Regular
    Joined
    Sep 2014
    Posts
    37
    Location
    Hi All,

    Its quite urgent i need u people help.....

    I did the enhancement, but its causing a problem as below:

    For all the data validated cells the dropwodn is working, but only and only for one column with the data validation is not working.
    Let me explain:

    I have a column C(in which all most all the cells are implemented with the data validation). well i am taking its screen shot. please find it.
    With data validation the values are being shown.

    Its not showing any values particularly for those cells in the drop down- for which i wrote code.
    Its showing the values for the datavalidated cells only.

    Also there is a formula which i have pasted..

    In the screenshot check it out, i have made the dropdon little small so that you people can distinguish the values not coming in to the dropdown.

    Link followed: http://www.contextures.com/xlDataVal14.html


    Please check it out.

    Thanks in Advance
    Seema
    Attached Images Attached Images
    Last edited by Prity; 02-16-2015 at 06:54 AM. Reason: image

Posting Permissions

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