Hi all,
I have been asked to enhance an existing Excel application by my boss. This existing Excel application has a module called mdlCalcFee. Inside this module, there is an enum declaration as below:
Public enum Product_fields
Product_Name = 1
Sub_Product =2
Volume = 7
Price =9
end enum
Actually, this enum is for the purpose of storing the column number of a particular cell range of Product A. This enum would be used by the following code inside the mdlCalcFee (I just listed out an example here):
if rng.cells(i, product_fields.product_name) <> "" then
...
end if
Right now, my boss would like to ask me to add Product B in this Excel application. Product B will have same enum structure as Product A, but with different column number. (e.g. Product_name = 2, sub_Product =4, volume = 9, price = 12)
My question is, how to write some codes such that when Product A call this module, the enum of Product_fields would use Product A set while Product B would use its own set. (Actually, more products would be added in this excel application, that is why I want to write it in a more generic way)
I am sorry for my poor explanation but I have tried to "google" some resolution for my question with no luck.
Thank you for your help in advance
Bookmarks