Can anyone tell me what is going wrong?
My code consists partly the following statements:
.
.
.
Sub Dialog_Run(ByVal FormName As String)
Select Case FormName
Case "Aufzug_HQ_GG"
Range("AufzNr") = Aufzug_HQ_GG.AufzNrBox.Value
Range("HQ") = Aufzug_HQ_GG.HQ_Box.Value
Range("GG") = Aufzug_HQ_GG.GG_Box.Value
Range("GU") = Aufzug_HQ_GG.GU_Box.Value
Range("GH") = Aufzug_HQ_GG.GH_Box.Value
Range("FM") = Aufzug_HQ_GG.FM_Box.Value
Aufzug_HQ_GG.Show
'
Case "Aux_Daten"
Range("xFP") = Aux_Daten.xFP_Box.Value
Range("yFP") = Aux_Daten.yFP_Box.Value
Range("Xecc") = Aux_Daten.XeccBox.Value
Range("Yecc") = Aux_Daten.YeccBox.Value
Aux_Daten.Show
'
Case "Cwt_Abmasse"
Range("TG") = Cwt_Abmasse.TG_Box.Value
Range("BG") = Cwt_Abmasse.BG_Box.Value
Range("HGF") = Cwt_Abmasse.HGF_Box.Value
Range("HFg") = Cwt_Abmasse.HFg_Box.Value
Cwt_Abmasse.Show
'
Case "GU_GH_XYCoord"
Range("xGH") = GU_GH_XYCoord.xGH_Box.Value
Range("yGH") = GU_GH_XYCoord.yGH_Box.Value
Range("xGU") = GU_GH_XYCoord.xGU_Box.Value
Range("yGU") = GU_GH_XYCoord.yGU_Box.Value
Range("xGUS") = GU_GH_XYCoord.xGUS_Box.Value
Range("yGUS") = GU_GH_XYCoord.yGUS_Box.Value
GU_GH_XYCoord.Show
'
End Select
End Sub
"Aufzug_HQ_GG", "Aux_Daten", "Cwt_Abmasse", "GU_GH_XYCoord"
are forms:
When I run the code I get "Compile error: variable not defined" on line ...Range("TG") = Cwt_Abmasse.TG_Box.Value
Obviously "Cwt_Abmasse" has not been recognized as a form!
Who knows the remedy ???
The code runs without error if all lines with
Range("...") = Cwt_Abmasse....Value are commented.
My code consists partly the following statements:
.
.
.
Sub Dialog_Run(ByVal FormName As String)
Select Case FormName
Case "Aufzug_HQ_GG"
Range("AufzNr") = Aufzug_HQ_GG.AufzNrBox.Value
Range("HQ") = Aufzug_HQ_GG.HQ_Box.Value
Range("GG") = Aufzug_HQ_GG.GG_Box.Value
Range("GU") = Aufzug_HQ_GG.GU_Box.Value
Range("GH") = Aufzug_HQ_GG.GH_Box.Value
Range("FM") = Aufzug_HQ_GG.FM_Box.Value
Aufzug_HQ_GG.Show
'
Case "Aux_Daten"
Range("xFP") = Aux_Daten.xFP_Box.Value
Range("yFP") = Aux_Daten.yFP_Box.Value
Range("Xecc") = Aux_Daten.XeccBox.Value
Range("Yecc") = Aux_Daten.YeccBox.Value
Aux_Daten.Show
'
Case "Cwt_Abmasse"
Range("TG") = Cwt_Abmasse.TG_Box.Value
Range("BG") = Cwt_Abmasse.BG_Box.Value
Range("HGF") = Cwt_Abmasse.HGF_Box.Value
Range("HFg") = Cwt_Abmasse.HFg_Box.Value
Cwt_Abmasse.Show
'
Case "GU_GH_XYCoord"
Range("xGH") = GU_GH_XYCoord.xGH_Box.Value
Range("yGH") = GU_GH_XYCoord.yGH_Box.Value
Range("xGU") = GU_GH_XYCoord.xGU_Box.Value
Range("yGU") = GU_GH_XYCoord.yGU_Box.Value
Range("xGUS") = GU_GH_XYCoord.xGUS_Box.Value
Range("yGUS") = GU_GH_XYCoord.yGUS_Box.Value
GU_GH_XYCoord.Show
'
End Select
End Sub
"Aufzug_HQ_GG", "Aux_Daten", "Cwt_Abmasse", "GU_GH_XYCoord"
are forms:
When I run the code I get "Compile error: variable not defined" on line ...Range("TG") = Cwt_Abmasse.TG_Box.Value
Obviously "Cwt_Abmasse" has not been recognized as a form!
Who knows the remedy ???
The code runs without error if all lines with
Range("...") = Cwt_Abmasse....Value are commented.