Created
November 23, 2014 17:37
-
-
Save mritzmann/93b400f1d505141a81b5 to your computer and use it in GitHub Desktop.
VBA Zeitzonen Rechner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' ------------------------------------------------ | |
' Author: Patrick Albrecht und Markus Ritzmann | |
' Version: 141102 | |
' | |
' Copyright (C) 2014 mritzmann and heubergen | |
' | |
' This program is free software: you can redistribute it and/or modify | |
' it under the terms of the GNU General Public License as published by | |
' the Free Software Foundation, either version 3 of the License, or | |
' (at your option) any later version. | |
' | |
' This program is distributed in the hope that it will be useful, | |
' but WITHOUT ANY WARRANTY; without even the implied warranty of | |
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
' GNU General Public License for more details. | |
' | |
' You should have received a copy of the GNU General Public License | |
' along with this program. If not, see <http://www.gnu.org/licenses/>. | |
' ------------------------------------------------ | |
Private Sub UserForm_Initialize() 'Wird beim ausfuehren des VBA Scripts automatisch ausgefuehrt | |
A_Zeitzone1.RowSource = "A2:A540" 'Liste der verfuegbaren Staedte wird eingelesen | |
A_Zeitzone2.RowSource = "A2:A540" 'Liste der verfuegbaren Staedte wird eingelesen | |
End Sub | |
Private Sub A_Berechnen_Click() 'Wird bei einem Klick auf den Berechnen-Button ausgefuehrt | |
Range("J6").Value = A_Zeitzone1.Value 'Die durch das DropDown-Menu ausgewaehlte Stadt wird in die Zelle J6 gespeichert | |
Range("J7").Value = A_Zeitzone2.Value 'Die durch das DropDown-Menu ausgewaehlte Stadt wird in die Zelle J7 gespeichert | |
AW_utc1.Value = Range("K6") 'Zelle K6 wird ausgegeben | |
AW_utc2.Value = Range("K7") 'Zelle K7 wird ausgegeben | |
AW_zeit1.Value = Format((Range("L6")), "hh:mm") 'Zelle L6 wird im hh:mm Format ausgegeben | |
AW_zeit2.Value = Format((Range("L7")), "hh:mm") 'Zelle L6 wird im hh:mm Format ausgegeben | |
AS_utc1.Value = Range("M6") 'Zelle M6 wird ausgegeben | |
AS_utc2.Value = Range("M7") 'Zelle KM wird ausgegeben | |
AS_zeit1.Value = Format((Range("N6")), "hh:mm") 'Zelle N6 wird im hh:mm Format ausgegeben | |
AS_zeit2.Value = Format((Range("N7")), "hh:mm") 'Zelle N6 wird im hh:mm Format ausgegeben | |
AW_Differenz.Value = Format((Range("J9")), "hh:mm") 'Zelle J9 wird im hh:mm Format ausgegeben | |
AS_Differenz.Value = Format((Range("J10")), "hh:mm") 'Zelle J10 wird im hh:mm Format ausgegeben | |
End Sub | |
Private Sub About_Click() 'Wird beim Klicken auf den About Button aufgerufen | |
UserForm2.Show 'UserForm2 (neue Fenster) wird anzeigt | |
End Sub | |
Private Sub Beenden_Click() 'Wird beim Klicken auf Beenden ausgefuehrt | |
Unload Me 'Programm wird geschlossen | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment