papadogiannakis
New Member
- Joined
- Nov 22, 2018
- Messages
- 3
Hello, I have a problem that I just can't figure out. I wrote some code to print stickers. However it doesn't seem to do what I want it to do.
When I run the macro the first message box pops up, however if I click on 'no' it stops when It should ask me another question. Why doesn't it continue?
Thanks in advance!
Code:
Sub VRBG()
Dim msgValue
msgValue = MsgBox("Heb commerciele media?", vbYesNo, "Stickers printen!")
If msgValue = vbYes Then
Sheets("VRBG").Select
ActiveSheet.Cells(2, 8).Select
ActiveCell.Value = InputBox("Wat is de Batch Code?")
ActiveSheet.Cells(4, 8).Select
ActiveCell.Value = InputBox("Wat is de Houdbaarheidsdatum? DD-MM-JJJJ")
ActiveSheet.Cells(8, 8).Select
ActiveCell.Value = InputBox("Hoeveel stickers wil je?")
msgValue = MsgBox("Zit je op Pathogenen?", vbYesNo, "Commerciele Stickers Printen")
If msgValue = vbYes Then
Sheets("VRBG").Select
ActiveSheet.PageSetup.PrintArea = "$G$1:$I$5"
ActiveSheet.PrintOut Copies:=Worksheets("VRBG").Range("H8"), ActivePrinter:="DYMO Labelwriter 450 Duo Label"
Sheets("Buttons").Select
If msgValue = vbNo Then
msgValue = MsgBox("Zit je in de Mediakeuken/Kantoor?", vbYesNo, "Stickers Printen")
If msgValue = vbYes Then
Sheets("VRBG").Select
ActiveSheet.PageSetup.PrintArea = "$G$1:$I$5"
ActiveSheet.PrintOut Copies:=Worksheets("VRBG").Range("H8"), ActivePrinter:="DYMO Labelwriter Duo Label"
Sheets("Buttons").Select
If msgValue = vbNo Then
msgValue = MsgBox("Zit je in de Mediakeuken/Kantoor?", vbYesNo, "Zelfgemaakte Stickers Printen")
If msgValue = vbYes Then
Sheets("VRBG").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$C$5"
ActiveSheet.PrintOut Copies:=Worksheets("Buttons").Range("B4"), ActivePrinter:="DYMO Labelwriter Duo Label"
Sheets("Buttons").Select
ElseIf msgValue = vbNo Then
msgValue = MsgBox("Zit je op Pathogenen?", vbYesNo, "Stickers Printen")
If msgValue = vbYes Then
Sheets("RVS").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$C$5"
ActiveSheet.PrintOut Copies:=Worksheets("Buttons").Range("B4"), ActivePrinter:="DYMO Labelwriter 450 Duo Label"
Sheets("Buttons").Select
End If
End If
End If
End If
End If
End If
End If
End Sub
When I run the macro the first message box pops up, however if I click on 'no' it stops when It should ask me another question. Why doesn't it continue?
Thanks in advance!