Option Explicit ' Keep track of whether the printer is in two color mode Dim TwoColorSet As Boolean Private Sub Command1_Click() StarComm1.StarComm_InitialisePrintJob If Not TwoColorSet Then ' The first thing that needs to be sent before two color mode is ' this command: StarComm1.StarComm_Output Chr(27) & Chr(30) & Chr(67) & Chr(49) TwoColorSet = True End If ' Before printing text, set the color ' (48 is for black text) StarComm1.StarComm_Output Chr(27) & Chr(30) & Chr(99) & Chr(48) ' Then send the text StarComm1.StarComm_Output Text1.Text & Chr(10) StarComm1.StarComm_Print End Sub Private Sub Command2_Click() StarComm1.StarComm_InitialisePrintJob If Not TwoColorSet Then ' The first thing that needs to be sent before two color mode is ' this command: StarComm1.StarComm_Output Chr(27) & Chr(30) & Chr(67) & Chr(49) TwoColorSet = True End If ' Before printing text, set the color ' (49 is for black text) StarComm1.StarComm_Output Chr(27) & Chr(30) & Chr(99) & Chr(49) ' Then send the text StarComm1.StarComm_Output Text1.Text & Chr(10) StarComm1.StarComm_Print End Sub Private Sub Form_Load() TwoColorSet = False End Sub Private Sub Form_Unload(Cancel As Integer) ' On exit, if desired, two color mode can be turned off StarComm1.StarComm_InitialisePrintJob StarComm1.StarComm_Output Chr(27) & Chr(30) & Chr(67) & Chr(48) StarComm1.StarComm_Print End Sub