I have a worksheet where I keep track of certain events that I have scheduled. The worksheet covers scheduling of events in
13 locations, and allows me to schedule 11 items per day. It is easier to put all 13 locations on a single worksheet, than to
create 13 separate worksheets.
I have a worksheet-change code (courtesy of Don Wells, a big contributor to these
forums) that I took from another workbook I made a couple of years ago. This is how it works: I have dates (Jan 1-Dec 31st)
in col C and data in 6 adjacent columns in row 5 (eg: H5:M5). In col N5, I can enter a date and it will 'move' the data from
H5:M5 to another row (eg: H27:M27)and erase the data from the 'old' date (row 5). There are 2 parts to the code and I am
attaching a sample xls file to illustrate things, including the code. It works fine when I only have a single location
However, I have 13 locations, with 11 line items/day. "Location #2" has its data in columns S:X
and I want to use col Y to move Location #2 data from one date (eg: Jan 4) to another date (eg: Jan 24). I copied the code
for Location #1 and changed the ranges accordingly. Then, I went onto Location #3, which has its data in columns AD:AI, and I
want to use col AJ to move the data for Location #3.......and so on and so on....for all 13 locations. As with Location #2, I
copied the same code for Location #1 and changed the ranges to correspond with the proper ranges found in Location #3.
Here is the problem: I have named the functions as Worksheet_Change, and you will see reference to a function called
"Postpone"..........when I copy the code I am using for Location #1 and use it for Location #2 (and changing the columns
appropriately), or do the same for Location #3, nothing works anymore.
I get an error message about an ambiguous
name and I think it is because the functions have the same 'name' (even though the cell ranges are different for each
location and event).....my question is whether it is possible to give these worksheet change events different names? I have
tried to call them Worksheet_Change1, Worksheet_Change2...or Worksheet_Change_1 and Worksheet_Change_2, but I think that
putting a 1 or a 2 into the name prevents the function from running.
If need be, I suppose I can make 13
worksheets (one for each location) and use the worksheet_change event code in each, but it is much more convenient to users
to be able to have all 13 locations on a single worksheet. Any ideas, suggestions??..thank you.