Rado88
12-30-2017, 04:06 AM
Hi all,
I'm trying to create macro for my job, but I'm not sure how to do this. I googled through many topics on this forum and YT videos, but I'm still not sure how to achieve this.
What I need to do?
Problem 1:
I have one sheet in excel called "sheet2" with list of numbers from 1 to 60. This list is random so not 1,2,3,4,5 but 1,16,52 etc. I need to create a macro button that will draw the next number from this list and populate it to a different sheet in the same excel file (sheet1, field B8). The button will be located in sheet2 and the numbers are situated in fields B2 to B61.
Problem 2:
I need to enable this macro only for certain people, so I have to protect it with a password or what would be the best protect it and hide the whole sheet from other people who can see only sheet 1. Is there any way to block the macro button so that only certain users may be able to use it? Is there any way to also show who and when pressed this button?
Problem 3:
This is the biggest problem. This will be a read only file used by many people so it won’t save. Is there any way to make excel remember which number from problem 1 was drawn, despite the copy did not save when previous user closed original excel?
I already created a macro that saves a copy of excel file with the data that someone created in sheet 1. However I doubt that it’s possible that it’s possible to create a macro to save such information for many newly created copies (to remember which number was lastly used on all of those).
Thank you very much in advance for any help.
Rado
I'm trying to create macro for my job, but I'm not sure how to do this. I googled through many topics on this forum and YT videos, but I'm still not sure how to achieve this.
What I need to do?
Problem 1:
I have one sheet in excel called "sheet2" with list of numbers from 1 to 60. This list is random so not 1,2,3,4,5 but 1,16,52 etc. I need to create a macro button that will draw the next number from this list and populate it to a different sheet in the same excel file (sheet1, field B8). The button will be located in sheet2 and the numbers are situated in fields B2 to B61.
Problem 2:
I need to enable this macro only for certain people, so I have to protect it with a password or what would be the best protect it and hide the whole sheet from other people who can see only sheet 1. Is there any way to block the macro button so that only certain users may be able to use it? Is there any way to also show who and when pressed this button?
Problem 3:
This is the biggest problem. This will be a read only file used by many people so it won’t save. Is there any way to make excel remember which number from problem 1 was drawn, despite the copy did not save when previous user closed original excel?
I already created a macro that saves a copy of excel file with the data that someone created in sheet 1. However I doubt that it’s possible that it’s possible to create a macro to save such information for many newly created copies (to remember which number was lastly used on all of those).
Thank you very much in advance for any help.
Rado