Hi all,
I am going around and around in circles and struggling a little bit with my query. I am barely proficient in VBA and much of my coding comes from collecting snippets of info from here and other forums. However, I am struggling with this one.
I have a module that is looking at a few different worksheets in a workbook, taking a range of information from each and updating a worksheet that is used to produce a report (so it is designed to be aesthetically pleasing rather than useful for data recovery.)
I have managed to get all the data onto the sheet, and I am happy with that - even if it is a bit slow.
So then, I want a userform to pop up which has a whole bunch of checkboxes on. The user then selects which columns they want to display on their printed sheet and presses 'select'. My guess is that I need to make an array of the control names for each checkbox (because these corrolate to the headings of the sheet) and then pass these back to the original module which then hides the columns as required before printing it.
userform sample.jpg
this is my code on the userform:
and this is my module code:![]()
Please Login or Register to view this content.
Am I at least on the right track? For some reason the userform opens but after I press the button everything seems to fall over. I am not currently getting any errors, but the userform doesn't close and it doesn't seem to return anything to the module.![]()
Please Login or Register to view this content.
Any guidance gratefully received.
Bookmarks