Snoreboy01
New Member
- Joined
- Apr 8, 2009
- Messages
- 7
(Excel 2007, Win XP)
Hi there.
I have created a button that calls ChooseType. I choose what type, hit the Choose button and it does what it is supouse to do.
What I want to add in now, is that when I click on Choose, it inserts the value and then:
Open new user form named ChooseLevel and then Closes the current user form: ChooseType.
Here is the code I have:
Private Sub ChooseType_Click()
Sheets("CharNameHere").Activate
' TypePerson
If ChooseTypePerson Then
Call SetPerson
End If
' TypeCreature
If ChooseTypeCreature Then
Call SetCreature
End If
' TypeDivine
If ChooseTypeDivine Then
Call SetDivine
End If
' TypeTitan
If ChooseTypeTitan Then
Call SetTitan
End If
ChooseLvl.Show
Unload ChooseType
End Sub
Sub SetPerson()
Worksheets("CharNameHere").Activate
Range("B4").Value = "Person"
End Sub
Sub SetCreature()
Worksheets("CharNameHere").Activate
Range("B4").Value = "Creature"
End Sub
Sub SetDivine()
Worksheets("CharNameHere").Activate
Range("B4").Value = "Divine"
End Sub
Sub SetTitan()
Worksheets("CharNameHere").Activate
Range("B4").Value = "Titan"
End Sub
It opens ChooseLvl but then dosn't Unload ChooseType.
If I close the ChooseLvl window, then I get the error:
Run time error: '361' can not load or unload this error.
What am I doing wrong please?
Thank you.
Hi there.
I have created a button that calls ChooseType. I choose what type, hit the Choose button and it does what it is supouse to do.
What I want to add in now, is that when I click on Choose, it inserts the value and then:
Open new user form named ChooseLevel and then Closes the current user form: ChooseType.
Here is the code I have:
Private Sub ChooseType_Click()
Sheets("CharNameHere").Activate
' TypePerson
If ChooseTypePerson Then
Call SetPerson
End If
' TypeCreature
If ChooseTypeCreature Then
Call SetCreature
End If
' TypeDivine
If ChooseTypeDivine Then
Call SetDivine
End If
' TypeTitan
If ChooseTypeTitan Then
Call SetTitan
End If
ChooseLvl.Show
Unload ChooseType
End Sub
Sub SetPerson()
Worksheets("CharNameHere").Activate
Range("B4").Value = "Person"
End Sub
Sub SetCreature()
Worksheets("CharNameHere").Activate
Range("B4").Value = "Creature"
End Sub
Sub SetDivine()
Worksheets("CharNameHere").Activate
Range("B4").Value = "Divine"
End Sub
Sub SetTitan()
Worksheets("CharNameHere").Activate
Range("B4").Value = "Titan"
End Sub
It opens ChooseLvl but then dosn't Unload ChooseType.
If I close the ChooseLvl window, then I get the error:
Run time error: '361' can not load or unload this error.
What am I doing wrong please?
Thank you.