Morshed_Dhaka
New Member
- Joined
- Dec 16, 2016
- Messages
- 42
Hello Everyone,
I am looking for a VBA-Macro help . I already complete the macro by using macro recorder. But every time, I need to change that code when the sheet name was changed. Please, anyone kindly help. Here is description of my problem :
1. I have a excel macro enabled file which has 34 sheets
2. 1st Sheet named as "START UP" which is fixed, not changing time to time
3. 2nd sheet named as "NATIONAL" which is fixed, not changing time to time
4. 3rd sheet named as "REGIONAL" which is fixed, not changing time to time
5. 4th to 34th sheet named as "01-01-2018", "02-01-2018","03-01-2018" to "31-01-2018" . It is basically 31 days of the Month January 2018. If the month is March 2018 then the sheet name will changes to "01-03-2018" to "31-03-2018"
I have code by using macro recorder that shows :
a) I am hiding "start up", "national" & "regional" sheets
b) Selecting all visible sheets which is "01-01-2018" to "31-01-2018"
c) Copy > Value Paste all those sheets selected ranges data
d) after copy > value paste , unselect all the sheets
the problem is by macro recorder, they recognizes all the data wise sheets name in macro. But I am looking for a macro that will run the copy>value paste operation in all the visible sheets. If I change the sheet name, for example "01-01-2018" to "01-05-2018" the code will work because it is not considering the sheet name.
Please, kindly help me by provide your suggestion.
Thanks.
I am looking for a VBA-Macro help . I already complete the macro by using macro recorder. But every time, I need to change that code when the sheet name was changed. Please, anyone kindly help. Here is description of my problem :
1. I have a excel macro enabled file which has 34 sheets
2. 1st Sheet named as "START UP" which is fixed, not changing time to time
3. 2nd sheet named as "NATIONAL" which is fixed, not changing time to time
4. 3rd sheet named as "REGIONAL" which is fixed, not changing time to time
5. 4th to 34th sheet named as "01-01-2018", "02-01-2018","03-01-2018" to "31-01-2018" . It is basically 31 days of the Month January 2018. If the month is March 2018 then the sheet name will changes to "01-03-2018" to "31-03-2018"
I have code by using macro recorder that shows :
a) I am hiding "start up", "national" & "regional" sheets
b) Selecting all visible sheets which is "01-01-2018" to "31-01-2018"
c) Copy > Value Paste all those sheets selected ranges data
d) after copy > value paste , unselect all the sheets
the problem is by macro recorder, they recognizes all the data wise sheets name in macro. But I am looking for a macro that will run the copy>value paste operation in all the visible sheets. If I change the sheet name, for example "01-01-2018" to "01-05-2018" the code will work because it is not considering the sheet name.
Please, kindly help me by provide your suggestion.
Thanks.