Greetings to all professional excel-users and -programmers! Very useful forum, really!
I just made my first steps with Visual-Basic in Excel beacause my boss wants me to create something like a converter.
So here's the point:
In one sheet, there will be thousands of values listed upside-down while every coluns specifies one field (just as it would look in access). The problem is, that the same lists in our company have the columns sorted in a different order. So the user had to find out, which column corresponds to which and had had to copy and paste these columns manually for to get to our format.
Now my idea is to guide the user throug all of our columns and let him select the corresponding column in his file. This is relatively simple to implement using controls like listbox (I already have some experience in that stuff). But my big problem is the following:
For to get the event of selection change, I have to use "Worksheet_SelectionChange" which has to be "installed" inside the worksheet I need to convert. But the user shouldn't have to do this by himself, beacause his files shouldn't be changed at all.
The user should just import my module and run it. So now, let's ask the question:
Is there another Event-Procedure than "Worksheet_SelectionChange" for to get the selection-change-event independently of the sheet to be converted?
or
Is there a possibility to create this modules automatically by my module by adding them temporarly?
The procedure to insert would be just these three lines:
Private Sub Worksheet_SelectionChange(ByVal Target As range)
Run "MyModule_TheMacroDoingallthestuffIneed", Target
End Sub
Maybe there is a solution, maybe not (actually I don't think so), but perhaps anyone could help me or just give me hints?
Thanks in advance!