jamesinnewcastle
New Member
- Joined
- Jul 29, 2019
- Messages
- 5
Hi All
My first question. I use Excel, have programmed in Basic, have coded in machine code. I can sort of work out what is going on in a program but I don't know any of the instruction set of VBA.
I have an Excel sheet that lists various products in one column. The user types in the number of each item he wants in the next column. I then use the 'Filter' button (Autofilter?) on the 'number' column and by unticking 0 the filter removes all the products not selected. So starting with
Beans 0
Hats 1
Nails 0
Bats 55
eggs 0
Filter on column 2 and untick 0 and it produces:
Hats 1
Bats 55
Great!
However the end user is not Excel savvy and will forget how to filter the results so I have added a 'button' to do all the column section, filtering, and deleting the 0, etc. This means all he has to do is push the button to get the list of items he selected.
So with a keystroke recorder this should be easy, I eagerly recorded the keystrokes as a macro only to find that it doesn't reproduce the keystrokes but rather rebuilds the Filter "pull down" of the original sheet used to make the 'recording' and so when I change the number of products or add products the Macro just tries to reapply the selection of the original sheet and any new items added since making the macro do not show up.
I have fiddled with the instructions in the Macro using examples from the internet, and while I can produce working Macros by doing this, they just don't do what I need.
I have looked at third party keystroke recorders but they don't allow me to put a big button on the Excel sheet and my users certainly would not want to add the keystroke program to their computers!
I know that I should look deeper into VBA and do this for myself but it seems like such a simple task that you guys might be able to just reel off a solution or suggest an alternative, any suggestions would be appreciated!
Cheers
James
My first question. I use Excel, have programmed in Basic, have coded in machine code. I can sort of work out what is going on in a program but I don't know any of the instruction set of VBA.
I have an Excel sheet that lists various products in one column. The user types in the number of each item he wants in the next column. I then use the 'Filter' button (Autofilter?) on the 'number' column and by unticking 0 the filter removes all the products not selected. So starting with
Beans 0
Hats 1
Nails 0
Bats 55
eggs 0
Filter on column 2 and untick 0 and it produces:
Hats 1
Bats 55
Great!
However the end user is not Excel savvy and will forget how to filter the results so I have added a 'button' to do all the column section, filtering, and deleting the 0, etc. This means all he has to do is push the button to get the list of items he selected.
So with a keystroke recorder this should be easy, I eagerly recorded the keystrokes as a macro only to find that it doesn't reproduce the keystrokes but rather rebuilds the Filter "pull down" of the original sheet used to make the 'recording' and so when I change the number of products or add products the Macro just tries to reapply the selection of the original sheet and any new items added since making the macro do not show up.
I have fiddled with the instructions in the Macro using examples from the internet, and while I can produce working Macros by doing this, they just don't do what I need.
I have looked at third party keystroke recorders but they don't allow me to put a big button on the Excel sheet and my users certainly would not want to add the keystroke program to their computers!
I know that I should look deeper into VBA and do this for myself but it seems like such a simple task that you guys might be able to just reel off a solution or suggest an alternative, any suggestions would be appreciated!
Cheers
James