ilyaskazi
05-20-2005, 11:38 PM
following is the code given which detects activesheet.name and display msgbox for each-n-every sheets...
Sub getSht_Name()
cnShts = Application.Sheets.Count
For i = 1 To cnShts
Sheets(i).Select
shtname = ActiveSheet.Name
MsgBox shtname
Next i
End Sub
i m attaching 1 file here for which this code does'nt work.
I hv checked this with some other normal excel files and got the output correct. But unable to trace out with this file attached here.
Plz somebody check and let me know.
Sub getSht_Name()
cnShts = Application.Sheets.Count
For i = 1 To cnShts
Sheets(i).Select
shtname = ActiveSheet.Name
MsgBox shtname
Next i
End Sub
i m attaching 1 file here for which this code does'nt work.
I hv checked this with some other normal excel files and got the output correct. But unable to trace out with this file attached here.
Plz somebody check and let me know.