ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel macro - Range & Sheet name error (https://www.excelbanter.com/excel-programming/301636-excel-macro-range-sheet-name-error.html)

sjohns34

Excel macro - Range & Sheet name error
 
I have created a macro for a friend. Here are the specs:

The wkrbook has 36 pages. Each page tracks 5 depart accounting entrie
on the same page. (each page is for the day of the month entry fo
each department) The information is then summaries for each departmen
on a summary sheet. The format of each page is exactly the same.

Macro:
I wrote a relative macro to work on each worksheet in the wrkbook b
using the active sheet rather than a sheet name and used range names t
identify each of the departments on the worksheet. The range names ar
the same on each sheet.

Problem:
The macro was working but now it crashes on the range names and th
sheet name. I get an error 9. Can anyone tell me if this was th
incorrect approach or how to error proof the macro.

ps...I would have personally used access to achieve this goal

--
Message posted from http://www.ExcelForum.com


Bob Phillips[_6_]

Excel macro - Range & Sheet name error
 
Show the code.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"sjohns34 " wrote in message
...
I have created a macro for a friend. Here are the specs:

The wkrbook has 36 pages. Each page tracks 5 depart accounting entries
on the same page. (each page is for the day of the month entry for
each department) The information is then summaries for each department
on a summary sheet. The format of each page is exactly the same.

Macro:
I wrote a relative macro to work on each worksheet in the wrkbook by
using the active sheet rather than a sheet name and used range names to
identify each of the departments on the worksheet. The range names are
the same on each sheet.

Problem:
The macro was working but now it crashes on the range names and the
sheet name. I get an error 9. Can anyone tell me if this was the
incorrect approach or how to error proof the macro.

ps...I would have personally used access to achieve this goal.


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 10:46 AM.

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