+ Reply to Thread
Results 1 to 5 of 5

Macro to hide and unhide based on the condition in Checkbox and also Textbox

  1. #1
    Registered User
    Join Date
    04-04-2014
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Macro to hide and unhide based on the condition in Checkbox and also Textbox

    Hi Guys,

    The macro code provided by chatgpt is working but then it only work partially.

    anyone know how to correct the code?

    In short i want excel to help me unhide column and only show me those that match my tickbox or month that input to the textbox here.

    Capture.JPG

    it is working halfway now, only tick will work, but when i input month for example 2, all the 2 together with the checkbox ticked will show. what i want is, when i tick actual and input 2, only actual with month 2 to show.

    i have already spent the few hour with chatcpt to amend this but seems like it did not get what i want after so many attempt....
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    12-30-2020
    Location
    Odessa / Ukraine
    MS-Off Ver
    2021
    Posts
    302

    Re: Macro to hide and unhide based on the condition in Checkbox and also Textbox

    Hello @holymushroom. Here's all the code for your form. Check it out and let me know if it works for you. It works for me without any problems.
    Please Login or Register  to view this content.
    Good luck.

    UPDATE!
    I forgot to say. In order to display the month you need, simply enter 02 (February) or 03 (March) in the textbox and so on.
    Last edited by MikeVol; 10-03-2023 at 08:08 AM. Reason: Update

  3. #3
    Registered User
    Join Date
    04-04-2014
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Macro to hide and unhide based on the condition in Checkbox and also Textbox

    Capture2.JPG



    Hi Mike, thanks for the updated code, when i tick budget and also key in 02, all the budget in month 1 until month 9 is appearing, also the actual with 02 is also appearing.
    did ur testing give you this result?

    what i need is budget that match 2 to appear in the result only.

    once again thank you

    Last edited by holymushroom; 10-03-2023 at 09:42 PM.

  4. #4
    Registered User
    Join Date
    04-04-2014
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Macro to hide and unhide based on the condition in Checkbox and also Textbox

    Quote Originally Posted by MikeVol View Post
    Hello . Here's all the code for your form. Check it out and let me know if it works for you. It works for me without any problems.
    bro can you please guide me how you get the code to work?

  5. #5
    Valued Forum Contributor
    Join Date
    12-30-2020
    Location
    Odessa / Ukraine
    MS-Off Ver
    2021
    Posts
    302

    Re: Macro to hide and unhide based on the condition in Checkbox and also Textbox

    Hello @holymushroom.
    bro can you please guide me how you get the code to work?
    So I didn't understand you. I carefully looked at the logic of the code and I can say that in order to get the desired result you need to rewrite the entire code. But I don't have time for this, sorry. Maybe someone else can help you. Good luck.

+ 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. Hide/ Unhide Rows based on Text Value - Checkbox
    By Jomayne in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-16-2021, 04:00 AM
  2. [SOLVED] Hide and Unhide sheet based on Checkbox status
    By MagicMan in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-02-2019, 09:29 AM
  3. [SOLVED] Hide/unhide based on ComboBox value and CheckBox value
    By Rzzberry in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 07-31-2017, 11:54 AM
  4. Hide/unhide 2 columns based on checkbox
    By horsefish01 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-12-2015, 03:27 AM
  5. Hide and Unhide worksheets based on checkbox Tick
    By TwistedFaith in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-14-2015, 01:23 PM
  6. [SOLVED] Macro to Automatically Hide/Unhide Rows Based on Checkbox
    By bga10s in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-27-2014, 07:32 PM
  7. [SOLVED] Hide/unhide Cell contents based on checkbox
    By Kelton in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-25-2014, 04:25 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