I wasn't sure if I should have added this here, or in the Excel section. I'm trying to do this in Excel, so here goes.
In my spreadsheet I'm using VBA to modify the contents of a pivot table. It works really well, actually. However, I'm also trying to include three radio/option buttons that would further filter down the table to only include the data that matches the button specified.
I have the following three (Form, not ActiveX) buttons: "WeeklyData", "MonthlyData", and "NoDateFilter".
I created a small sub to check if my buttons were working (because they didn't seem to be) and I discovered that each of the three buttons values are set to "False", even though I can clearly see that I've got one of them selected.
If I do the below vba I get "False False False" as a message, no matter which button I have selected.
I'e tried various different setups, but all others gave me errors, usually "Object Required."
I've tried adding .Value to the end of the button names. I've tried adding "Form." to the front. I've tried both! I've tried "ActiveWorkSheet."
I searched google to try and find an answer and none seemed to work. I just don't know anymore!
Please take a look, it's probably something simple.
Also real quick, if I simply do this:
I get a message box with nothing in it. If I add ".Value" to each of these I get an error "Object Required"
Does it matter that I'm using form buttons rather than ActiveX?
Thanks for the help.
I'm hoping that once I get past this issue I can move on with the function I'm writing.
Thanks again.
~Kit
In my spreadsheet I'm using VBA to modify the contents of a pivot table. It works really well, actually. However, I'm also trying to include three radio/option buttons that would further filter down the table to only include the data that matches the button specified.
I have the following three (Form, not ActiveX) buttons: "WeeklyData", "MonthlyData", and "NoDateFilter".
I created a small sub to check if my buttons were working (because they didn't seem to be) and I discovered that each of the three buttons values are set to "False", even though I can clearly see that I've got one of them selected.
If I do the below vba I get "False False False" as a message, no matter which button I have selected.
I'e tried various different setups, but all others gave me errors, usually "Object Required."
I've tried adding .Value to the end of the button names. I've tried adding "Form." to the front. I've tried both! I've tried "ActiveWorkSheet."
I searched google to try and find an answer and none seemed to work. I just don't know anymore!
Please take a look, it's probably something simple.
Code:
Sub Test()
Dim WValue As Boolean
Dim MValue As Boolean
Dim NoValue As Boolean
NoValue = NoDateButton
WValue = WeeklyButton
MValue = MonthlyButton
MsgBox WValue & " " & MValue & " " & NoValue
End Sub
Also real quick, if I simply do this:
Code:
MsgBox NoDateButton & " " & WeeklyButton & " " & MonthlyButton
Does it matter that I'm using form buttons rather than ActiveX?
Thanks for the help.
I'm hoping that once I get past this issue I can move on with the function I'm writing.
Thanks again.
~Kit
Last edited: