Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6059049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:40:02+00:00 2026-05-23T08:40:02+00:00

just a query more than anything. Not sure if im allowed to just ask

  • 0

just a query more than anything. Not sure if im allowed to just ask a question on here without submitting code? but anyway here goes.

Wondering whether it is possible in Excel using vba to show/hide sections of a form depending on what date it is. The form i’m creating will be used for audits and each month a different audit is completed. The form will be used as described below.

Workbook opens —- user enters a patient id number (lookup function used to retrieve data from database(I DON’T NEED HELP WITH THIS BIT) —– user chooses yes / no from dropdown

yes – shows relevant form depending on date
no – leaves form as is.

Can’t think of a suitable way to tackle set the form up and dont know how to show/hide sections so any suggestions would be grateful.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:40:03+00:00Added an answer on May 23, 2026 at 8:40 am

    Your question is a little open-ended and clearly there isn’t a definitive answer. Here are some of my intial thoughts:

    If your forms only vary slightly (i.e. 90% the same and only 10% is variable) and it is only a certain section(s) of the form that varies, then maybe create each section and then selectively hide.

    For example, suppose I have a section that is different depending upon whether the user is male of female. I could build both sections and then show / hide as follows:

    If gender = "Male" Then
        Rows("10:20").EntireRow.Hidden = True //Assume you built male section in rows 10 to 20
        Range("20:30").EntireRow.Hidden = false //Assume you built female section in 20 to 30
    Else // replicate code for female scenario
        Rows("10:20").EntireRow.Hidden = False
        Rows("20:30").EntireRow.Hidden = True
    End if
    

    If your forms vary a lot (i.e. only 10% static and 90% variable) my experience is that you are better off building each form separately in a different worksheet and then displaying accordingly:

    If gender = "Male" Then
         Worksheets("maleForm").Visible = True
    Else
         Worksheets("femaleForm").Visible = True
    End if
    

    If your input fields differ then you can consider disabling certain fields selectively:

     If gender = "Male" Then
          Worksheets("myForm").OLEObjects("lipstickDropDown").Enabled = False //Using Control Toolbox items e.g. textbox, combobox etc...
          Worksheets("myForm").OLEObjects("beerDropDown").Enabled = True
     Else
          Worksheets("myForm").OLEObjects("lipstickDropDown").Enabled = True 
          Worksheets("myForm").OLEObjects("beerDropDown").Enabled = False
     End if
    

    If I can add to this later I will do. Does any of this help you out?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry for the length of this, but more info is usually better than not
I know there is more than one question out there that matches this, but
I've just saw a very slow query in my application. Table 'News' has more
I'm struggling to read query variables that contain more than 512 characters in the
Here is my problem. I need more than one row from the database, and
I wanna to stop these query which will update more than 10k row at
Hi searched through the questions here, but couldn't find anything. I'm new at writing
This is a high level/design type question rather than anything specific. In this game
More of a warning than a question: We resolved a very puzzling bug this
Using just an sql query is it possible to write the contents of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.