Hello,
I am new to the forum so I hope that it is alright to ask this question here. If not, I would appreciate if you could direct me to the right place.
With that said, here is the problem:
I am building a mini Supply&Sales System. It has sheets governing data entry and sheets containing various databases. Data Entry Sheets (sheets with Tanımlama in their names) have comboboxes with VBA code that extract data from databases, process it, assign it to a dynamic named range and use it as the listfill for the combobox.
Data Entry Sheets also have buttons that trigger Subs from Module1 in order to extract from, modify and create entries in the databases governed by those data entry sheets.
However, I have noticed something strange. When I run one of those database modifying subs from Module1, the code will jump to a Combobox governing VBA Private Sub, run that sub and pick up where it left in the Module1 Sub.
I have no idea why this would happen. I am totally lost. I have built it in a way that prevents this from being a problem for now, but as I continue building the system it will be a major problem in similar tasks. Could somebody please explain to me what's going on and how I can prevent this from happening?
Illustrative example: Open the attached project. Go to Code. (All Passwords = test). Go to Module1. Find Sub Product_Edit () and step into it (f8). Ignore the first message and you will notice that as you step through the code in the section of code titled "'Transfer data from source to Target" it will switch over to Private Sub Cbo_Product_Tier3_Change() that is part of Products Sheet. Why does this even happen?
Thanks a lot for all the help you can give!
Ozan
PS. I apoligise for the Turkish in the file. It is being designed for non-English speaking users. All non user facing info is in English though.
PPS. I realise that the code is very inefficient, redundant and amateur. I am sure that there are more elegant solutions. However, these are the solutions that work with my limited VBA knowledge and even more limited time that prevents me from learning more. Why I have decided to undertake such a task with this level of knowledge is also a question I am asking myself.
PPS. Any help with proper coding is appreciated. Particularly with the interdependant Comboboxes/range extraction from database/dynamic named range creation thing I have going on in the sheet "Ürün Tanımlama".
Bookmarks