Hello everyone,
It's been a long time since I was active here. I usually used VBA for projects at work but after a few switches I'm now back again to automate things.
Project:
I have a Userform with multiple tools for calculations etc for the airline I'm working for. I'd like to give users the ability to plot the routes in Google Earth that are stored as *.kml files.
Problem:
The routes have the format depdest**.kml where dep = departure station and dest = arrival/destination station. Amsterdam to Madrid looks like AMSMAD01.kml.
But there is more than 1 route available... 01-09 (normal routes) and 31-34 (contingency routes) and 90-94 (special used routes).
I am able to let the user open 1 route (AMSMAD01.kml) but it seems impossible to me to get this in a loop to check for all files beginning with AMSMAD. Preferably AMSMAD01 till AMSMAD99. I have found many codes on the internet and I combined them the best I could but still no multiple routes in Google Earth.
The user has 2 textboxes. The first is to enter the departure station (GC_Pred_dep) and the 2nd is for the arrival station (GC_Pred_dest).
1.png
I created the following code. Is anyone able to solve this mystery? Any help is much appreciated!
EDIT: Google Earth does open en it also opens 1 or 2 routes, but not all. And I suspect that the amount of errors I get when executing the code are equal to the amount of routes that don't show up.
2.png
Bookmarks