hi everyone, i have the following codes..
Set wks = Worksheets.Add(After:=Worksheets(Worksheets.Count - 1))
wks.Name = "Chk_"
how do i code it so that 'Chk_' will display Chk_1 when i click a button to run the macro. then Chk_2 when i click again and Chk_3 and so on..
in my excel, there are the following spreadsheets:
list, chk_1, chk_2, chk_3, chk_,4, chk_,5, chk_6, SQL Used.
so when i click the button with my macro, it should be Chk_7
but if i delete two spreadsheet, chk_6 and chk_7. Then i click the button, it should give me chk_6
Set wks = Worksheets.Add(After:=Worksheets(Worksheets.Count - 1))
wks.Name = "Chk_"
how do i code it so that 'Chk_' will display Chk_1 when i click a button to run the macro. then Chk_2 when i click again and Chk_3 and so on..
in my excel, there are the following spreadsheets:
list, chk_1, chk_2, chk_3, chk_,4, chk_,5, chk_6, SQL Used.
so when i click the button with my macro, it should be Chk_7
but if i delete two spreadsheet, chk_6 and chk_7. Then i click the button, it should give me chk_6