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.
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 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 your input fields differ then you can consider disabling certain fields selectively:
If I can add to this later I will do. Does any of this help you out?