ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Problem renaming worksheets (https://www.excelbanter.com/excel-discussion-misc-queries/83882-problem-renaming-worksheets.html)

ArenaNinja

Problem renaming worksheets
 

After countlessly deleting empty rows with my mouse, I proceeded to
insert a macro inside all files which I need to empty rows from. The
formula is as follows:

Sub DeleteEmptyRows()

Dim LastRow As Long, r As Long

LastRow = ActiveSheet.UsedRange.Row - 1 +
ActiveSheet.UsedRange.Rows.Count
Application.ScreenUpdating = False

For r = LastRow To 1 Step -1
If Application.CountA(Rows(r)) = 0 Then Rows(r).Delete
Next r

Application.ScreenUpdating = True

End Sub


For two days, I've used this formula without a problem. However, today,
when I renamed my worksheets, excel keeps adding an ".xls]" at the
beginning of the worksheet's name (note: not the filename). Is there
any reason or way that the macros would be interfering with the
software? If so, how can I fix it? or was it that I accidentally
enabled some random functionality? something else? Please help!

Note: I only have this problem in workbooks where I have utilized the
macro.

P.S.: I am using Excel 2000, but any general guidelines for any other
year would be helpful and much appreciated.


--
ArenaNinja
------------------------------------------------------------------------
ArenaNinja's Profile: http://www.excelforum.com/member.php...o&userid=33624
View this thread: http://www.excelforum.com/showthread...hreadid=533979


Dave Peterson

Problem renaming worksheets
 
Close excel.
Open windows explorer.
Go to the folder with that file.
Rename it and remove any [ and ] characters.



ArenaNinja wrote:

After countlessly deleting empty rows with my mouse, I proceeded to
insert a macro inside all files which I need to empty rows from. The
formula is as follows:

Sub DeleteEmptyRows()

Dim LastRow As Long, r As Long

LastRow = ActiveSheet.UsedRange.Row - 1 +
ActiveSheet.UsedRange.Rows.Count
Application.ScreenUpdating = False

For r = LastRow To 1 Step -1
If Application.CountA(Rows(r)) = 0 Then Rows(r).Delete
Next r

Application.ScreenUpdating = True

End Sub


For two days, I've used this formula without a problem. However, today,
when I renamed my worksheets, excel keeps adding an ".xls]" at the
beginning of the worksheet's name (note: not the filename). Is there
any reason or way that the macros would be interfering with the
software? If so, how can I fix it? or was it that I accidentally
enabled some random functionality? something else? Please help!

Note: I only have this problem in workbooks where I have utilized the
macro.

P.S.: I am using Excel 2000, but any general guidelines for any other
year would be helpful and much appreciated.

--
ArenaNinja
------------------------------------------------------------------------
ArenaNinja's Profile: http://www.excelforum.com/member.php...o&userid=33624
View this thread: http://www.excelforum.com/showthread...hreadid=533979


--

Dave Peterson


All times are GMT +1. The time now is 10:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com