4 Replies - 400 Views - Last Post: 28 September 2018 - 02:25 AM Rate Topic: -----

#1 jram15   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 19-May 11

how to split into multiple sub and print in a single excel sheet

Posted 27 September 2018 - 12:33 PM

ERROR SHOWS PROCEDURE TOO LARGE




Private Sub cmdexp_Click()
On Error GoTo errorhandler


    
   
  Dim oExcel As Object
    Dim oBook As Object
    Dim oSheet As Object
    Set oExcel = CreateObject("Excel.Application")
    Set oBook = oExcel.Workbooks.Add
    Set oSheet = oExcel.Worksheets.Add
    
  'PAGE BREAK UPS

   With oExcel.ActiveSheet
   oExcel.ActiveSheet.PageSetup.Zoom = False
   oExcel.ActiveSheet.PageSetup.FitToPagesTall = 1
   oExcel.ActiveSheet.PageSetup.FitToPagesWide = 1
  End With
  
  
  
'FOR THE COLUMN WIDTH
    oBook.Worksheets(1).Range("B3").ColumnWidth = 80
    oBook.Worksheets(1).Range("C3").ColumnWidth = 40
    oBook.Worksheets(1).Range("D3").ColumnWidth = 50
    oBook.Worksheets(1).Range("E3").ColumnWidth = 40
    oBook.Worksheets(1).Range("F3").ColumnWidth = 40
    oBook.Worksheets(1).Range("G3").ColumnWidth = 40
    
'FOT THE ROW HEIGHT
    oBook.Worksheets(1).Range("B2:B52").RowHeight = 50
    
    

'Rem Make Excel Visible

   oExcel.Visible = True
   

 With oExcel.ActiveSheet
 
 'TOP HORIZONTAL LINES
 
.Range("B3:G3").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B4:G4").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B5:G5").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B6:G6").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B7:G7").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B8:G8").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B9:G9").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B10:G10").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B10:G10").Borders(xlEdgeTop).linestyle = xlContinuous

.Range("B11:G11").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B12:G12").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B13:G13").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B14:G14").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B15:G15").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B16:G16").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B17:G17").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B18:G18").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B19:G19").Borders(xlEdgeTop).linestyle = xlContinuous

.Range("B20:G20").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B21:G21").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B22:G22").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B23:G23").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B24:G24").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B25:G25").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B26:G26").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B27:G27").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B28:G28").Borders(xlEdgeTop).linestyle = xlContinuous


.Range("B29:G29").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B30:G30").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B31:G31").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B32:G32").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B33:G33").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B34:G34").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B35:G35").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B36:G36").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B37:G37").Borders(xlEdgeTop).linestyle = xlContinuous

.Range("B38:G38").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B39:G39").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B40:G40").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B41:G41").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B42:G42").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B43:G43").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B44:G44").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B45:G45").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B46:G46").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B47:G47").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B48:G48").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B49:G49").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B50:G50").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B51:G51").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B52:G52").Borders(xlEdgeTop).linestyle = xlContinuous
.Range("B53:G53").Borders(xlEdgeTop).linestyle = xlContinuous
'.Range("B54:G54").Borders(xlEdgeTop).linestyle = xlContinuous
'.Range("B55:G55").Borders(xlEdgeTop).linestyle = xlContinuous
'.Range("B56:G56").Borders(xlEdgeTop).linestyle = xlContinuous



'LEFT VERTICAL LINES

.Range("B3:B52").Borders(xlEdgeLeft).linestyle = xlContinuous
.Range("C3:C52").Borders(xlEdgeLeft).linestyle = xlContinuous
.Range("D3:D52").Borders(xlEdgeLeft).linestyle = xlContinuous
.Range("E3:E52").Borders(xlEdgeLeft).linestyle = xlContinuous
.Range("F3:F52").Borders(xlEdgeLeft).linestyle = xlContinuous
.Range("G3:G52").Borders(xlEdgeLeft).linestyle = xlContinuous
.Range("H3:H52").Borders(xlEdgeLeft).linestyle = xlContinuous


 End With
   
 'FOR THE HEADER -C1-
 
 
 
 

   
'FOR THE HEADER -C1-

oBook.Worksheets(1).Range("C1") = txtheader.Text
oBook.Worksheets(1).Range("C1").Font.Name = "Verdana"
oBook.Worksheets(1).Range("C1").Font.Size = 30
oBook.Worksheets(1).Range("C1").Font.Bold = True
   
   
   
 

    
    
    
 'FOR THE JOB NUMBER ALPHABET - B2-
  
   oBook.Worksheets(1).Range("B3") = "JOB NO"
   oBook.Worksheets(1).Range("B3").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B3").Font.Size = 25
   
   oBook.Worksheets(1).Range("B3").Font.Name = "Verdana"
   
   
  'FOR THE COLUMN JOB NO NUMERICAL-C3-
   oBook.Worksheets(1).Range("C3", "D3").Merge
   oBook.Worksheets(1).Range("C3") = txtjobno.Text
   oBook.Worksheets(1).Range("C3").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("C3").Font.Size = 25
   oBook.Worksheets(1).Range("C3").Font.Bold = True
   oBook.Worksheets(1).Range("C3").Font.Name = "Verdana"
   
'FOR THE SFNO - E2-
  
  oBook.Worksheets(1).Range("E3") = "S.F. NO"
  oBook.Worksheets(1).Range("E3").HorizontalAlignment = myVAlignLeft
  oBook.Worksheets(1).Range("E3").Font.Size = 25
  oBook.Worksheets(1).Range("E3").Font.Name = "Verdana"
  
  
  'FOR THE MACHINE NO -F2-
  
   oBook.Worksheets(1).Range("F3") = txtsfno.Text
   oBook.Worksheets(1).Range("F3").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("F3").Font.Size = 25
   oBook.Worksheets(1).Range("F3").Font.Bold = True
   oBook.Worksheets(1).Range("F3").Font.Name = "Verdana"
   
  'FOR THE MACHINE CAPACITY -G3-
   oBook.Worksheets(1).Range("G3") = txtmach.Text
   oBook.Worksheets(1).Range("G3").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("G3").Font.Size = 25
   oBook.Worksheets(1).Range("G3").Font.Bold = True
   oBook.Worksheets(1).Range("G3").Font.Name = "Verdana"
  
  
  
  'FOR THE JOB NUMBER ALPHABET - B3-
  
   oBook.Worksheets(1).Range("B4") = "LAB SAMPLE NO"
   oBook.Worksheets(1).Range("B4").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B4").Font.Size = 25
   oBook.Worksheets(1).Range("B4").Font.Name = "Verdana"
   
'FOR THE COLUMN JOB NO NUMERICAL-C4-
   oBook.Worksheets(1).Range("C4", "D4").Merge
   oBook.Worksheets(1).Range("C4") = txtlsno.Text
   oBook.Worksheets(1).Range("C4").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("C4").Font.Size = 25
   oBook.Worksheets(1).Range("C4").Font.Bold = True
   oBook.Worksheets(1).Range("C4").Font.Name = "Verdana"
   
  'FOR THE SFNO - E3-
  
  oBook.Worksheets(1).Range("E4") = "DATE & TIME"
  oBook.Worksheets(1).Range("E4").HorizontalAlignment = myVAlignLeft
  oBook.Worksheets(1).Range("E4").Font.Size = 25
  oBook.Worksheets(1).Range("E4").Font.Name = "Verdana"
   
 'FOR THE MACHINE NO -F3-
    txtdate.Text = Format(txtdate, "dd/MMMM/yyyy")

   oBook.Worksheets(1).Range("F4") = txtdate.Text
   oBook.Worksheets(1).Range("F4").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("F4").Font.Size = 25
   oBook.Worksheets(1).Range("F4").Font.Bold = True
   oBook.Worksheets(1).Range("F4").Font.Name = "Verdana"
 'FOR THE MACHINE CAPACITY -G4-
   
   
   oBook.Worksheets(1).Range("G4") = txtdatea.Text
   oBook.Worksheets(1).Range("G4").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("G4").Font.Size = 25
   oBook.Worksheets(1).Range("G4").Font.Bold = True
   oBook.Worksheets(1).Range("G4").Font.Name = "Verdana"
   
 'FOR THE JOB NUMBER ALPHABET - B4-
  
   oBook.Worksheets(1).Range("B5") = "CUSTOMER"
   oBook.Worksheets(1).Range("B5").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B5").Font.Size = 25
   oBook.Worksheets(1).Range("B5").Font.Name = "Verdana"
   
   
  'FOR THE COLUMN JOB NO NUMERICAL-C5-
 
   oBook.Worksheets(1).Range("C5", "D5").Merge
   oBook.Worksheets(1).Range("C5") = txtcus.Text
   oBook.Worksheets(1).Range("C5").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("C5").Font.Size = 25
   oBook.Worksheets(1).Range("C5").Font.Bold = True
   oBook.Worksheets(1).Range("C5").Font.Name = "Verdana"
   
   
   
 'FOR THE SFNO -E4-
  
  oBook.Worksheets(1).Range("E5") = "COLOR"
  oBook.Worksheets(1).Range("E5").HorizontalAlignment = myVAlignLeft
  oBook.Worksheets(1).Range("E5").Font.Size = 25
  oBook.Worksheets(1).Range("E5").Font.Name = "Verdana"
   
   
 'FOR THE MACHINE NO -F5-
   oBook.Worksheets(1).Range("F5", "G5").Merge
   oBook.Worksheets(1).Range("F5") = txtcolour.Text
   oBook.Worksheets(1).Range("F5").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("F5").Font.Size = 25
   oBook.Worksheets(1).Range("F5").Font.Bold = True
   oBook.Worksheets(1).Range("F5").Font.Name = "Verdana"
   
   
   
   
   
   
   
   
 'FOR THE JOB NUMBER ALPHABET - B5-
  
   oBook.Worksheets(1).Range("B6") = "DC NO"
   oBook.Worksheets(1).Range("B6").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B6").Font.Size = 25
   oBook.Worksheets(1).Range("B6").Font.Name = "Verdana"
   
   'FOR THE COLUMN JOB NO NUMERICAL-C6-
   oBook.Worksheets(1).Range("C6", "D6").Merge
   oBook.Worksheets(1).Range("C6") = txtdc.Text
   oBook.Worksheets(1).Range("C6").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("C6").Font.Size = 25
   oBook.Worksheets(1).Range("C6").Font.Bold = True
   oBook.Worksheets(1).Range("C6").Font.Name = "Verdana"
   
   'FOR THE SFNO - E6-
  
  oBook.Worksheets(1).Range("E6") = "WEIGHT"
  oBook.Worksheets(1).Range("E6").HorizontalAlignment = myVAlignLeft
  oBook.Worksheets(1).Range("E6").Font.Size = 25
  oBook.Worksheets(1).Range("E6").Font.Name = "Verdana"
   
  'FOR THE MACHINE NO -F6-
  
   oBook.Worksheets(1).Range("F6") = txtweight.Text
   oBook.Worksheets(1).Range("F6").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("F6").Font.Size = 25
   oBook.Worksheets(1).Range("F6").Font.Bold = True
   oBook.Worksheets(1).Range("F6").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(6, 6).NumberFormat = "0.00"
   End With
   
   
   
   
   
   
   
     
 'FOR THE JOB NUMBER ALPHABET - B7-
  
   oBook.Worksheets(1).Range("B7") = "RATE"
   oBook.Worksheets(1).Range("B7").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B7").Font.Size = 25
   oBook.Worksheets(1).Range("B7").Font.Name = "Verdana"
   
   'FOR THE COLUMN JOB NO NUMERICAL-C7-
   oBook.Worksheets(1).Range("C7", "D7").Merge
   oBook.Worksheets(1).Range("C7") = txtrate.Text
   oBook.Worksheets(1).Range("C7").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("C7").Font.Size = 25
   oBook.Worksheets(1).Range("C7").Font.Bold = True
   oBook.Worksheets(1).Range("C7").Font.Name = "Verdana"
   
   
   
  'FOR THE SFNO - E7-
  
  oBook.Worksheets(1).Range("E7") = "ROLLS"
  oBook.Worksheets(1).Range("E7").HorizontalAlignment = myVAlignLeft
  oBook.Worksheets(1).Range("E7").Font.Size = 25
  oBook.Worksheets(1).Range("E7").Font.Name = "Verdana"
   
  'FOR THE MACHINE NO -F7-
  
   oBook.Worksheets(1).Range("F7") = txtroll.Text
   oBook.Worksheets(1).Range("F7").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("F7").Font.Size = 25
   oBook.Worksheets(1).Range("F7").Font.Bold = True
   oBook.Worksheets(1).Range("F7").Font.Name = "Verdana"
   
   
   
   
'FOR THE JOB NUMBER ALPHABET - B8-
  
   oBook.Worksheets(1).Range("B8") = "FABRIC STRUCTURE"
   oBook.Worksheets(1).Range("B8").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B8").Font.Size = 25
   oBook.Worksheets(1).Range("B8").Font.Name = "Verdana"
   
  'FOR THE COLUMN JOB NO NUMERICAL-C8-
   oBook.Worksheets(1).Range("C8", "D8").Merge
   oBook.Worksheets(1).Range("C8") = ""
   oBook.Worksheets(1).Range("C8").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("C8").Font.Size = 25
   oBook.Worksheets(1).Range("C8").Font.Bold = True
   oBook.Worksheets(1).Range("C8").Font.Name = "Verdana"
   
  'FOR THE SFNO - E8-
  
  oBook.Worksheets(1).Range("E8") = "WATER"
  oBook.Worksheets(1).Range("E8").HorizontalAlignment = myVAlignLeft
  oBook.Worksheets(1).Range("E8").Font.Size = 25
  oBook.Worksheets(1).Range("E8").Font.Name = "Verdana"
   
   'FOR THE MACHINE NO -F8-
  
   oBook.Worksheets(1).Range("F8") = txtwater.Text
   oBook.Worksheets(1).Range("F8").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("F8").Font.Size = 25
   oBook.Worksheets(1).Range("F8").Font.Bold = True
   oBook.Worksheets(1).Range("F8").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(8, 6).Interior.Color = vbYellow
   oExcel.ActiveSheet.Cells(8, 6).NumberFormat = "0.00"
   End With
   
 'FOR THE JOB NUMBER ALPHABET - B9-
  
   oBook.Worksheets(1).Range("B9") = "DIA"
   oBook.Worksheets(1).Range("B9").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B9").Font.Size = 25
   oBook.Worksheets(1).Range("B9").Font.Name = "Verdana"
   
 'FOR THE COLUMN JOB NO NUMERICAL-C9-
   oBook.Worksheets(1).Range("C9", "D9").Merge
   oBook.Worksheets(1).Range("C9") = ""
   oBook.Worksheets(1).Range("C9").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("C9").Font.Size = 25
   oBook.Worksheets(1).Range("C9").Font.Bold = True
   oBook.Worksheets(1).Range("C9").Font.Name = "Verdana"
     
   
   
'FOR THE SFNO - E9-
  
  oBook.Worksheets(1).Range("E9") = "MLR"
  oBook.Worksheets(1).Range("E9").HorizontalAlignment = myVAlignLeft
  oBook.Worksheets(1).Range("E9").Font.Size = 25
  oBook.Worksheets(1).Range("E9").Font.Name = "Verdana"
      
   
 'FOR THE MACHINE NO -F9-
  
   oBook.Worksheets(1).Range("F9") = txtmlr.Text
   oBook.Worksheets(1).Range("F9").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("F9").Font.Size = 25
   oBook.Worksheets(1).Range("F9").Font.Bold = True
   oBook.Worksheets(1).Range("F9").Font.Name = "Verdana"
     
 
   
 
   

   
 
   
 
   
   

   
 
         
   
 'FOR THE JOB NUMBER ALPHABET - B10-
  
   oBook.Worksheets(1).Range("B10") = "DRUG ID"
   oBook.Worksheets(1).Range("B10").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B10").Font.Size = 25
   oBook.Worksheets(1).Range("B10").Font.Name = "Verdana"
   
  'FOR THE COLUMN JOB NO NUMERICAL-C10-
   oBook.Worksheets(1).Range("C10", "D10").Merge
   oBook.Worksheets(1).Range("C10") = txtdrugid.Text
   oBook.Worksheets(1).Range("C10").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("C10").Font.Size = 25
   oBook.Worksheets(1).Range("C10").Font.Bold = True
   oBook.Worksheets(1).Range("C10").Font.Name = "Verdana"
   
 'FOR THE SFNO - E10-
  
  oBook.Worksheets(1).Range("E10") = "QNO"
  oBook.Worksheets(1).Range("E10").HorizontalAlignment = myVAlignLeft
  oBook.Worksheets(1).Range("E10").Font.Size = 25
  oBook.Worksheets(1).Range("E10").Font.Name = "Verdana"
   
 'FOR THE SFNO - F10-
  
  oBook.Worksheets(1).Range("F10") = txtqno.Text
  oBook.Worksheets(1).Range("F10").HorizontalAlignment = myVAlignLeft
  oBook.Worksheets(1).Range("F10").Font.Size = 25
  oBook.Worksheets(1).Range("F10").Font.Name = "Verdana"
   
 'FOR THE JOB NUMBER ALPHABET - B11-
  
   oBook.Worksheets(1).Range("B11") = "PROCESS"
   oBook.Worksheets(1).Range("B11").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B11").Font.Size = 25
   oBook.Worksheets(1).Range("B11").Font.Name = "Verdana"
   
 'FOR THE COLUMN JOB NO NUMERICAL-C11-
   oBook.Worksheets(1).Range("C11", "D11").Merge
   oBook.Worksheets(1).Range("C11") = txtprocess.Text
   oBook.Worksheets(1).Range("C11").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("C11").Font.Size = 25
   oBook.Worksheets(1).Range("C11").Font.Bold = True
   oBook.Worksheets(1).Range("C11").Font.Name = "Verdana"
   
 'REMARKS- B12
   
   'FOR THE JOB NUMBER ALPHABET - B12-
  
   oBook.Worksheets(1).Range("B12") = "REMARKS"
   oBook.Worksheets(1).Range("B12").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B12").Font.Size = 25
   oBook.Worksheets(1).Range("B12").Font.Bold = True
   oBook.Worksheets(1).Range("B12").Font.Name = "Verdana"
   
 'REMARKS MERGER - D12
   
  'FOR THE COLUMN JOB NO NUMERICAL-B12-
  
   oBook.Worksheets(1).Range("D12", "E12").Merge
   oBook.Worksheets(1).Range("D12") = txtremarks.Text
   oBook.Worksheets(1).Range("D12").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D12").Font.Size = 25
   oBook.Worksheets(1).Range("D12").Font.Bold = True
   oBook.Worksheets(1).Range("D12").Font.Name = "Verdana"
   
  'REMARKS-DEMIN(HEADER)- B13
   
   oBook.Worksheets(1).Range("B13") = "PRETREATMENT/DEMIN"
   oBook.Worksheets(1).Range("B13").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("B13").Font.Size = 25
   oBook.Worksheets(1).Range("B13").Font.Bold = True
   oBook.Worksheets(1).Range("B13").Font.Name = "Verdana"
   
  'FOR THE JOB NUMBER ALPHABET - C13-
  
   oBook.Worksheets(1).Range("C13") = "GPL/%"
   oBook.Worksheets(1).Range("C13").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C13").Font.Size = 25
   oBook.Worksheets(1).Range("C13").Font.Bold = True
   oBook.Worksheets(1).Range("C13").Font.Name = "Verdana"
     
  'FOR THE JOB NUMBER ALPHABET - D13-
  
   oBook.Worksheets(1).Range("D13") = "QTY"
   oBook.Worksheets(1).Range("D13").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D13").Font.Size = 25
   oBook.Worksheets(1).Range("D13").Font.Bold = True
   oBook.Worksheets(1).Range("D13").Font.Name = "Verdana"
   
  'FOR HEADER DYES ADDITION I- E13-
  
   oBook.Worksheets(1).Range("E13") = "ADDITION I"
   oBook.Worksheets(1).Range("E13").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("E13").Font.Size = 25
   oBook.Worksheets(1).Range("E13").Font.Bold = True
   oBook.Worksheets(1).Range("E13").Font.Name = "Verdana"
   
 'FOR HEADER DYES ADDITION I- F13-
  
   oBook.Worksheets(1).Range("F13") = "ADDITION II"
   oBook.Worksheets(1).Range("F13").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("F13").Font.Size = 25
   oBook.Worksheets(1).Range("F13").Font.Bold = True
   oBook.Worksheets(1).Range("F13").Font.Name = "Verdana"
   
   'FOR HEADER DYES ADDITION I- G13-
  
   oBook.Worksheets(1).Range("G13") = "ADDITION III"
   oBook.Worksheets(1).Range("G13").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("G13").Font.Size = 25
   oBook.Worksheets(1).Range("G13").Font.Bold = True
   oBook.Worksheets(1).Range("G13").Font.Name = "Verdana"
   
   
   
   
   
    
  'DEMIN WETTING NAME- B14-
  
  If txtlycwetper.Text = "0.000" Then GoTo 10
  
   oBook.Worksheets(1).Range("B14") = txtlycwet.Text
   oBook.Worksheets(1).Range("B14").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B14").Font.Size = 35
   oBook.Worksheets(1).Range("B14").Font.Name = "Verdana"
   
  'DEMIN WETTING PER (GPL/%) -C14
    
   oBook.Worksheets(1).Range("C14") = txtlycwetper.Text
   oBook.Worksheets(1).Range("C14").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C14").Font.Size = 35
   oBook.Worksheets(1).Range("C14").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(14, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(25).Visible = True
   oBook.Worksheets(1).Range("A14") = txtChemB_unit(25).Text
   oBook.Worksheets(1).Range("A14").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A14").Font.Size = 20
   oBook.Worksheets(1).Range("A14").Font.Name = "Verdana"
   oBook.Worksheets(1).Range("A14").Font.Italic = True
   oBook.Worksheets(1).Range("A14").Font.Bold = True
   txtChemB_unit(25).Visible = False
   txtlycwetrate.Visible = True
   
  'DEMIN WETTING TOTAL QTY -D14-
   
   oBook.Worksheets(1).Range("D14") = txtlycwettot.Text
   oBook.Worksheets(1).Range("D14").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D14").Font.Size = 35
   oBook.Worksheets(1).Range("D14").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(14, 4).NumberFormat = "0.000"
   End With
  
'DEMIN WETTING TOTAL RATE -H14-
   
   'oBook.Worksheets(1).Range("H14") = txtLycwetrate.Text
   'oBook.Worksheets(1).Range("H14").HorizontalAlignment = myVAlignCenter
   'oBook.Worksheets(1).Range("H14").Font.Size = 20
   'oBook.Worksheets(1).Range("H14").Font.Bold = True
   'oBook.Worksheets(1).Range("H14").Font.Name = "Verdana"
   'With oExcel.ActiveSheet
   'oExcel.ActiveSheet.Cells(14, 8).NumberFormat = "0.00"
   'End With
10
   
    
   'DEMIN LUBRICANT NAME -B15-
   
   If txtlycbufper.Text = "0.000" Then GoTo 20
   
   oBook.Worksheets(1).Range("B15") = txtlycbuf.Text
   oBook.Worksheets(1).Range("B15").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B15").Font.Size = 35
   oBook.Worksheets(1).Range("B15").Font.Name = "Verdana"
   
     'DEMIN LUBRICANT PER -C15-
 
   
   oBook.Worksheets(1).Range("C15") = txtlycbufper.Text
   oBook.Worksheets(1).Range("C15").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C15").Font.Size = 35
   oBook.Worksheets(1).Range("C15").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(15, 3).NumberFormat = "0.000"
   End With

   txtChemB_unit(26).Visible = True
   oBook.Worksheets(1).Range("A15") = txtChemB_unit(26).Text
   oBook.Worksheets(1).Range("A15").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A15").Font.Size = 20
   oBook.Worksheets(1).Range("A15").Font.Italic = True
   oBook.Worksheets(1).Range("A15").Font.Name = "Verdana"
   oBook.Worksheets(1).Range("A15").Font.Bold = True
   With oExcel.ActiveSheet
   txtChemB_unit(26).Visible = False
   txtlycbufrate.Visible = True
   
   
 'DEMIN LUBRICANT TOTAL -D15-
   
   oBook.Worksheets(1).Range("D15") = txtlycbuftot.Text
   oBook.Worksheets(1).Range("D15").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D15").Font.Size = 35
   oBook.Worksheets(1).Range("D15").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(15, 4).NumberFormat = "0.000"
   End With
   
   'oBook.Worksheets(1).Range("H15") = txtLycbufrate.Text
   'oBook.Worksheets(1).Range("H15").HorizontalAlignment = myVAlignCenter
   'oBook.Worksheets(1).Range("H15").Font.Size = 20
   'oBook.Worksheets(1).Range("H15").Font.Bold = True
   'oBook.Worksheets(1).Range("H15").Font.Name = "Verdana"
   'With oExcel.ActiveSheet
   'oExcel.ActiveSheet.Cells(15, 8).NumberFormat = "0.00"
   'End With
   
20
 
   'DEMIN SEQUESTERING NAME- B16-
    If txtbufferbper.Text = "0.000" Then GoTo 30
 
   oBook.Worksheets(1).Range("B16") = txtbufferb.Text
   oBook.Worksheets(1).Range("B16").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B16").Font.Size = 35
   oBook.Worksheets(1).Range("B16").Font.Name = "Verdana"
   
   
 'DEMIN SEQUESTERING PER -C16-
   oBook.Worksheets(1).Range("C16") = txtbufferbper.Text
   oBook.Worksheets(1).Range("C16").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C16").Font.Size = 35
   oBook.Worksheets(1).Range("C16").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(16, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(6).Visible = True
   oBook.Worksheets(1).Range("A16") = txtChemB_unit(6).Text
   oBook.Worksheets(1).Range("A16").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A16").Font.Size = 20
   oBook.Worksheets(1).Range("A16").Font.Italic = True
   oBook.Worksheets(1).Range("A16").Font.Name = "Verdana"
   oBook.Worksheets(1).Range("A16").Font.Bold = True
   With oExcel.ActiveSheet
   txtChemB_unit(6).Visible = False
   txtbufferbrate.Visible = True
   
 'DEMIN SEQUESTERING QTY-D16-
   
   oBook.Worksheets(1).Range("D16") = txtbufferbtot.Text
   oBook.Worksheets(1).Range("D16").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D16").Font.Size = 35
   oBook.Worksheets(1).Range("D16").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(16, 4).NumberFormat = "0.000"
   End With
   
   'oBook.Worksheets(1).Range("H16") = txtBufferbrate.Text
   'oBook.Worksheets(1).Range("H16").HorizontalAlignment = myVAlignCenter
   'oBook.Worksheets(1).Range("H16").Font.Size = 20
   'oBook.Worksheets(1).Range("H16").Font.Bold = True
   'oBook.Worksheets(1).Range("H16").Font.Name = "Verdana"
   'With oExcel.ActiveSheet
   'oExcel.ActiveSheet.Cells(16, 8).NumberFormat = "0.00"
   'End With
   
   
30
   
 'HEADER PRETREATMETN/BLG- B17-

   oBook.Worksheets(1).Range("B17") = "PRETREATMENT/BLG"
   oBook.Worksheets(1).Range("B17").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("B17").Font.Size = 25
   oBook.Worksheets(1).Range("B17").Font.Bold = True
   oBook.Worksheets(1).Range("B17").Font.Name = "Verdana"
   
   
   
 'HEADER PRETREATMETN GPL/PER - C17-
  
   oBook.Worksheets(1).Range("C17") = "GPL/%"
   oBook.Worksheets(1).Range("C17").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C17").Font.Size = 25
   oBook.Worksheets(1).Range("C17").Font.Bold = True
   oBook.Worksheets(1).Range("C17").Font.Name = "Verdana"
     
  'HEADER PRETREATMETN QTY - D17-
  
   oBook.Worksheets(1).Range("D17") = "QTY"
   oBook.Worksheets(1).Range("D17").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D17").Font.Size = 25
   oBook.Worksheets(1).Range("D17").Font.Bold = True
   oBook.Worksheets(1).Range("D17").Font.Name = "Verdana"
   
  'PRETREATMETN/BLG- WETTING NAME - B18-
  If txtwettingper.Text = "0.000" Then GoTo 40
  
   oBook.Worksheets(1).Range("B18") = txtwetting.Text
   oBook.Worksheets(1).Range("B18").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B18").Font.Size = 35
   oBook.Worksheets(1).Range("B18").Font.Name = "Verdana"
   
      
 'PRETREATMETN/BLG- WETTING PER-C18-
   oBook.Worksheets(1).Range("C18") = txtwettingper.Text
   oBook.Worksheets(1).Range("C18").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C18").Font.Size = 35
   oBook.Worksheets(1).Range("C18").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(18, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(0).Visible = True
   oBook.Worksheets(1).Range("A18") = txtChemB_unit(0).Text
   oBook.Worksheets(1).Range("A18").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A18").Font.Size = 20
   oBook.Worksheets(1).Range("A18").Font.Italic = True
   oBook.Worksheets(1).Range("A18").Font.Name = "Verdana"
   txtChemB_unit(0).Visible = False
   txtwettingrate.Visible = True
   
  'PRETREATMETN/BLG- WETTING QTY -D18-
   
   oBook.Worksheets(1).Range("D18") = txtwettingtot.Text
   oBook.Worksheets(1).Range("D18").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D18").Font.Size = 35
   oBook.Worksheets(1).Range("D18").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(18, 4).NumberFormat = "0.000"
   End With
   
  'PRETREATMETN/BLG- WETTING RATE -H14-
   
   oBook.Worksheets(1).Range("H18") = txtwettingrate.Text
   oBook.Worksheets(1).Range("H18").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("H18").Font.Size = 20
   oBook.Worksheets(1).Range("H18").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(18, 8).NumberFormat = "0.00"
   End With
   
   
   
40
  'PRETREATMETN/BLG- LUBRICANT- NAME - B19-
 If txtlubrbper.Text = "0.000" Then GoTo 50
 
   oBook.Worksheets(1).Range("B19") = txtlubrb.Text
   oBook.Worksheets(1).Range("B19").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B19").Font.Size = 35
   oBook.Worksheets(1).Range("B19").Font.Name = "Verdana"
   
 'PRETREATMETN/BLG- LUBRICANT-PER-C19-
 
   oBook.Worksheets(1).Range("C19") = txtlubrbper.Text
   oBook.Worksheets(1).Range("C19").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C19").Font.Size = 35
   oBook.Worksheets(1).Range("C19").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(19, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(1).Visible = True
   oBook.Worksheets(1).Range("A19") = txtChemB_unit(1).Text
   oBook.Worksheets(1).Range("A19").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A19").Font.Size = 20
   oBook.Worksheets(1).Range("A19").Font.Italic = True
   oBook.Worksheets(1).Range("A19").Font.Name = "Verdana"
   txtChemB_unit(1).Visible = False
   txtlubrbrate.Visible = True

 'PRETREATMETN/BLG- LUBRICANT-QTY-D19-
   
   oBook.Worksheets(1).Range("D19") = txtlubrbtot.Text
   oBook.Worksheets(1).Range("D19").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D19").Font.Size = 35
   oBook.Worksheets(1).Range("D19").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(19, 4).NumberFormat = "0.000"
   End With
50
  'PRETREATMETN/BLG- STABILISER - NAME - B20-
If txtstabper.Text = "0.000" Then GoTo 60
   oBook.Worksheets(1).Range("B20") = txtstab.Text
   oBook.Worksheets(1).Range("B20").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B20").Font.Size = 35
   oBook.Worksheets(1).Range("B20").Font.Name = "Verdana"
   
  'PRETREATMETN/BLG- STABILISER - PER-C20-
  
  
   oBook.Worksheets(1).Range("C20") = txtstabper.Text
   oBook.Worksheets(1).Range("C20").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C20").Font.Size = 35
   oBook.Worksheets(1).Range("C20").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(20, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(4).Visible = True
   oBook.Worksheets(1).Range("A20") = txtChemB_unit(4).Text
   oBook.Worksheets(1).Range("A20").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A20").Font.Size = 20
   oBook.Worksheets(1).Range("A20").Font.Italic = True
   oBook.Worksheets(1).Range("A20").Font.Name = "Verdana"
   txtChemB_unit(4).Visible = False
   txtstabrate.Visible = True
   
   
   
  'PRETREATMETN/BLG- STABILISER - QTY-D20-
   
   oBook.Worksheets(1).Range("D20") = txtstabtot.Text
   oBook.Worksheets(1).Range("D20").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D20").Font.Size = 35
   oBook.Worksheets(1).Range("D20").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(20, 4).NumberFormat = "0.000"
   End With
60
 'PRETREATMETN/BLG- SODA ASH-NAME - B21-
 If txtsodabper.Text = "0.000" Then GoTo 70
 
   oBook.Worksheets(1).Range("B21") = txtsodab.Text
   oBook.Worksheets(1).Range("B21").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B21").Font.Size = 35
   oBook.Worksheets(1).Range("B21").Font.Name = "Verdana"
   
 'PRETREATMETN/BLG- SODA ASH-PER -C21-
   oBook.Worksheets(1).Range("C21") = txtsodabper.Text
   oBook.Worksheets(1).Range("C21").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C21").Font.Size = 35
   oBook.Worksheets(1).Range("C21").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(21, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(2).Visible = True
   oBook.Worksheets(1).Range("A21") = txtChemB_unit(2).Text
   oBook.Worksheets(1).Range("A21").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A21").Font.Size = 20
   oBook.Worksheets(1).Range("A21").Font.Italic = True
   oBook.Worksheets(1).Range("A21").Font.Name = "Verdana"
   txtChemB_unit(2).Visible = False
   txtsodabrate.Visible = True
   
 'PRETREATMETN/BLG- SODA ASH-QTY-D21-
   
   oBook.Worksheets(1).Range("D21") = txtsodabtot.Text
   oBook.Worksheets(1).Range("D21").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D21").Font.Size = 35
   oBook.Worksheets(1).Range("D21").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(21, 4).NumberFormat = "0.000"
   End With
70
 'PRETREATMETN/BLG- CAUSTIC SODA -NAME - B22-
If txtcausbper.Text = "0.000" Then GoTo 80
   oBook.Worksheets(1).Range("B22") = txtcausb.Text
   oBook.Worksheets(1).Range("B22").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B22").Font.Size = 35
   oBook.Worksheets(1).Range("B22").Font.Name = "Verdana"
     
   'PRETREATMETN/BLG- CAUSTIC SODA -PER-C22-
   
   oBook.Worksheets(1).Range("C22") = txtcausbper.Text
   oBook.Worksheets(1).Range("C22").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C22").Font.Size = 35
   oBook.Worksheets(1).Range("C22").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(22, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(3).Visible = True
   oBook.Worksheets(1).Range("A22") = txtChemB_unit(3).Text
   oBook.Worksheets(1).Range("A22").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A22").Font.Size = 20
   oBook.Worksheets(1).Range("A22").Font.Italic = True
   oBook.Worksheets(1).Range("A22").Font.Name = "Verdana"
   txtChemB_unit(3).Visible = False
   txtcausbrate.Visible = True
   
   'PRETREATMETN/BLG- CAUSTIC SODA -QTY-D22-
   
   oBook.Worksheets(1).Range("D22") = txtcausbtot.Text
   oBook.Worksheets(1).Range("D22").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D22").Font.Size = 35
   oBook.Worksheets(1).Range("D22").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(22, 4).NumberFormat = "0.000"
   End With
80
  'PRETREATMETN/BLG- PEROXIDE NAME- B23-
 If txtperoxper.Text = "0.000" Then GoTo 90
 
   oBook.Worksheets(1).Range("B23") = txtperox.Text
   oBook.Worksheets(1).Range("B23").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B23").Font.Size = 35
   oBook.Worksheets(1).Range("B23").Font.Name = "Verdana"
   
 'PRETREATMETN/BLG- PEROXIDE PER-C23-
 
   oBook.Worksheets(1).Range("C23") = txtperoxper.Text
   oBook.Worksheets(1).Range("C23").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C23").Font.Size = 35
   oBook.Worksheets(1).Range("C23").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(23, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(5).Visible = True
   oBook.Worksheets(1).Range("A23") = txtChemB_unit(5).Text
   oBook.Worksheets(1).Range("A23").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A23").Font.Size = 20
   oBook.Worksheets(1).Range("A23").Font.Italic = True
   oBook.Worksheets(1).Range("A23").Font.Name = "Verdana"
   txtChemB_unit(5).Visible = False
   txtperoxrate.Visible = True
   
 'PRETREATMETN/BLG- PEROXIDE QTY-D23-
   
   oBook.Worksheets(1).Range("D23") = txtperoxtot.Text
   oBook.Worksheets(1).Range("D23").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D23").Font.Size = 35
   oBook.Worksheets(1).Range("D23").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(23, 4).NumberFormat = "0.000"
   End With
90
   
 'PRETREATMETN/BLG- KILLER- NAME - B24-
   If txtkillerper.Text = "0.000" Then GoTo 100
   oBook.Worksheets(1).Range("B24") = txtkiller.Text
   oBook.Worksheets(1).Range("B24").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B24").Font.Size = 35
   oBook.Worksheets(1).Range("B24").Font.Name = "Verdana"
   
 'PRETREATMETN/BLG- KILLER- PER -C24-
   oBook.Worksheets(1).Range("C24") = txtkillerper.Text
   oBook.Worksheets(1).Range("C24").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C24").Font.Size = 35
   oBook.Worksheets(1).Range("C24").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(24, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(8).Visible = True
   oBook.Worksheets(1).Range("A24") = txtChemB_unit(8).Text
   oBook.Worksheets(1).Range("A24").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A24").Font.Size = 20
   oBook.Worksheets(1).Range("A24").Font.Italic = True
   oBook.Worksheets(1).Range("A24").Font.Name = "Verdana"
   txtChemB_unit(8).Visible = False
   txtkillerrate.Visible = True

   
   
   'PRETREATMETN/BLG- KILLER- QTY-D24-
   
   oBook.Worksheets(1).Range("D24") = txtkillertot.Text
   oBook.Worksheets(1).Range("D24").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D24").Font.Size = 35
   oBook.Worksheets(1).Range("D24").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(24, 4).NumberFormat = "0.000"
   End With
100
    'PRETREATMETN/BLG- A.ACID(B)/>/>- NAME - B25-
   If txtacidbper.Text = "0.000" Then GoTo 110

   oBook.Worksheets(1).Range("B25") = txtacidb.Text
   oBook.Worksheets(1).Range("B25").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B25").Font.Size = 35
   oBook.Worksheets(1).Range("B25").Font.Name = "Verdana"
   
   'PRETREATMETN/BLG- A.ACID(B)/>/>- PER -C25-
  
   oBook.Worksheets(1).Range("C25") = txtacidbper.Text
   oBook.Worksheets(1).Range("C25").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C25").Font.Size = 35
   oBook.Worksheets(1).Range("C25").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(25, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(7).Visible = True
   oBook.Worksheets(1).Range("A25") = txtChemB_unit(7).Text
   oBook.Worksheets(1).Range("A25").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A25").Font.Size = 20
   oBook.Worksheets(1).Range("A25").Font.Italic = True
   oBook.Worksheets(1).Range("A25").Font.Name = "Verdana"
   txtChemB_unit(7).Visible = False
   txtacidbrate.Visible = True
   
   
  'PRETREATMETN/BLG- A.ACID(B)/>/>- TOT-D25-
   
   oBook.Worksheets(1).Range("D25") = txtacidbtot.Text
   oBook.Worksheets(1).Range("D25").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D25").Font.Size = 35
   oBook.Worksheets(1).Range("D25").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(25, 4).NumberFormat = "0.000"
   End With
110

   
'PRETREATMETN/BLG- BIO - NAME- B26-
 If txtbioper.Text = "0.000" Then GoTo 120
 
   oBook.Worksheets(1).Range("B26") = txtbio.Text
   oBook.Worksheets(1).Range("B26").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B26").Font.Size = 35
   oBook.Worksheets(1).Range("B26").Font.Name = "Verdana"
   oBook.Worksheets(1).Range("B26").Font.Italic = True
   oBook.Worksheets(1).Range("B26").Font.Bold = True
   
 'PRETREATMETN/BLG- BIO - PER -C26-
 
   oBook.Worksheets(1).Range("C26") = txtbioper.Text
   oBook.Worksheets(1).Range("C26").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C26").Font.Size = 35
   oBook.Worksheets(1).Range("C26").Font.Name = "Verdana"
   oBook.Worksheets(1).Range("C26").Font.Italic = True
   oBook.Worksheets(1).Range("C26").Font.Bold = True
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(26, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(9).Visible = True
   oBook.Worksheets(1).Range("A26") = txtChemB_unit(9).Text
   oBook.Worksheets(1).Range("A26").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A26").Font.Size = 20
   oBook.Worksheets(1).Range("A26").Font.Italic = True
   oBook.Worksheets(1).Range("A26").Font.Name = "Verdana"
   txtChemB_unit(9).Visible = False
   txtbiorate.Visible = True
   
   
 'PRETREATMETN/BLG- BIO - TOT -G26-
   
   oBook.Worksheets(1).Range("D26") = txtbiotot.Text
   oBook.Worksheets(1).Range("D26").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D26").Font.Size = 35
   oBook.Worksheets(1).Range("D26").Font.Name = "Verdana"
   oBook.Worksheets(1).Range("D26").Font.Italic = True
   oBook.Worksheets(1).Range("D26").Font.Bold = True
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(26, 4).NumberFormat = "0.000"
   End With
120

'HEADER PRETREATMETN/BLG- B27-

   oBook.Worksheets(1).Range("B27") = "DYEBATH CHEMICAL"
   oBook.Worksheets(1).Range("B27").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("B27").Font.Size = 25
   oBook.Worksheets(1).Range("B27").Font.Bold = True
   oBook.Worksheets(1).Range("B27").Font.Name = "Verdana"
   
   
   
 'HEADER PRETREATMETN GPL/PER - C27-
  
   oBook.Worksheets(1).Range("C27") = "GPL/%"
   oBook.Worksheets(1).Range("C27").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C27").Font.Size = 25
   oBook.Worksheets(1).Range("C27").Font.Bold = True
   oBook.Worksheets(1).Range("C27").Font.Name = "Verdana"
     
  'HEADER PRETREATMETN QTY - D27-
  
   oBook.Worksheets(1).Range("D27") = "QTY"
   oBook.Worksheets(1).Range("D27").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D27").Font.Size = 25
   oBook.Worksheets(1).Range("D27").Font.Bold = True
   oBook.Worksheets(1).Range("D27").Font.Name = "Verdana"





 'LEVELLING NAME- B28-
 
If txtlevper.Text = "0.000" Then GoTo 130

   oBook.Worksheets(1).Range("B28") = txtlev.Text
   oBook.Worksheets(1).Range("B28").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B28").Font.Size = 35
   oBook.Worksheets(1).Range("B28").Font.Name = "Verdana"
   
 'LEVELLING PER-C28-
 
   oBook.Worksheets(1).Range("C28") = txtlevper.Text
   oBook.Worksheets(1).Range("C28").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C28").Font.Size = 35
   oBook.Worksheets(1).Range("C28").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(28, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(13).Visible = True
   oBook.Worksheets(1).Range("A28") = txtChemB_unit(13).Text
   oBook.Worksheets(1).Range("A28").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A28").Font.Size = 20
   oBook.Worksheets(1).Range("A28").Font.Italic = True
   oBook.Worksheets(1).Range("A28").Font.Name = "Verdana"
   txtChemB_unit(13).Visible = False
   txtlevrate.Visible = True

 'LEVELLING QTY-D28-
   
   oBook.Worksheets(1).Range("D28") = txtlevtot.Text
   oBook.Worksheets(1).Range("D28").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D28").Font.Size = 35
   oBook.Worksheets(1).Range("D28").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(28, 4).NumberFormat = "0.000"
   End With
130
  ' DYEING LUBRICANT NAME- B29-
 If txtlubrdper.Text = "0.000" Then GoTo 140
  
   oBook.Worksheets(1).Range("B29") = txtlubrd.Text
   oBook.Worksheets(1).Range("B29").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B29").Font.Size = 35
   oBook.Worksheets(1).Range("B29").Font.Name = "Verdana"
   
   
 'DYEING LUBRICANT PER -C29-
 
   oBook.Worksheets(1).Range("C29") = txtlubrdper.Text
   oBook.Worksheets(1).Range("C29").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C29").Font.Size = 35
   oBook.Worksheets(1).Range("C29").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(29, 3).NumberFormat = "0.000"
   End With
      
   txtChemB_unit(15).Visible = True
   oBook.Worksheets(1).Range("A29") = txtChemB_unit(15).Text
   oBook.Worksheets(1).Range("A29").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A29").Font.Size = 20
   oBook.Worksheets(1).Range("A29").Font.Italic = True
   oBook.Worksheets(1).Range("A29").Font.Name = "Verdana"
   txtChemB_unit(15).Visible = False
   txtlubrdrate.Visible = True
   
 'DYEING LUBRICANT QTY-D29-
   
   oBook.Worksheets(1).Range("D29") = txtlubrdtot.Text
   oBook.Worksheets(1).Range("D29").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D29").Font.Size = 35
   oBook.Worksheets(1).Range("D29").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(29, 4).NumberFormat = "0.000"
   End With
140
   
  'DYEING SEQ NAME- B30-
  
If txtseqper.Text = "0.000" Then GoTo 150

   oBook.Worksheets(1).Range("B30") = txtseq.Text
   oBook.Worksheets(1).Range("B30").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B30").Font.Size = 35
   oBook.Worksheets(1).Range("B30").Font.Name = "Verdana"
   
  
 'DYEING SEQ PER-C30-
 
   oBook.Worksheets(1).Range("C30") = txtseqper.Text
   oBook.Worksheets(1).Range("C30").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C30").Font.Size = 35
   oBook.Worksheets(1).Range("C30").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(30, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(14).Visible = True
   oBook.Worksheets(1).Range("A30") = txtChemB_unit(14).Text
   oBook.Worksheets(1).Range("A30").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A30").Font.Size = 20
   oBook.Worksheets(1).Range("A30").Font.Italic = True
   oBook.Worksheets(1).Range("A30").Font.Name = "Verdana"
   txtChemB_unit(14).Visible = False
   txtseqrate.Visible = True

   
 'DYEING SEQ QTY -D30-
   
   oBook.Worksheets(1).Range("D30") = txtseqtot.Text
   oBook.Worksheets(1).Range("D30").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D30").Font.Size = 35
   oBook.Worksheets(1).Range("D30").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(30, 4).NumberFormat = "0.000"
   End With
150
  'FOR HEADER DYES B31-
  
   oBook.Worksheets(1).Range("B31") = "DYES NAME"
   oBook.Worksheets(1).Range("B31").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("B31").Font.Size = 25
   oBook.Worksheets(1).Range("B31").Font.Bold = True
   oBook.Worksheets(1).Range("B31").Font.Name = "Verdana"
   
 'FOR HEADER DYES GPL/PER - C31-
  
   oBook.Worksheets(1).Range("C31") = "DYES %"
   oBook.Worksheets(1).Range("C31").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C31").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C31").Font.Size = 25
   oBook.Worksheets(1).Range("C31").Font.Bold = True
   oBook.Worksheets(1).Range("C31").Font.Name = "Verdana"
     
 
   
'FOR HEADER DYES QTY- D31-
  
   oBook.Worksheets(1).Range("D31") = "   KGS      MGS"
   oBook.Worksheets(1).Range("D31").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D31").Font.Size = 25
   oBook.Worksheets(1).Range("D31").Font.Bold = True
   oBook.Worksheets(1).Range("D31").Font.Name = "Verdana"
   
 
  
   'FOR DYE1 NAME - B32-
 If txtdye1per.Text = "0.000000" Then GoTo 160
 
   oBook.Worksheets(1).Range("B32") = txtdye1.Text
   oBook.Worksheets(1).Range("B32").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B32").Font.Size = 30
   oBook.Worksheets(1).Range("B32").Font.Bold = True
   oBook.Worksheets(1).Range("B32").Font.Name = "Verdana"
 
   
 'FOR DYE1 PER - C32-
 
   oBook.Worksheets(1).Range("C32") = txtdye1per.Text
   oBook.Worksheets(1).Range("C32").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C32").Font.Size = 30
   oBook.Worksheets(1).Range("C32").Font.Bold = True
   oBook.Worksheets(1).Range("C32").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(32, 3).NumberFormat = "0.000 000"
   End With
     
   txtDye1unit(0).Visible = True
   oBook.Worksheets(1).Range("A32") = txtDye1unit(0).Text
   oBook.Worksheets(1).Range("A32").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A32").Font.Size = 20
   oBook.Worksheets(1).Range("A32").Font.Italic = True
   oBook.Worksheets(1).Range("A32").Font.Name = "Verdana"
   txtDye1unit(0).Visible = False
   txtdye1rate.Visible = True
     

 'FOR DYE1 QTY - D32-
  
   oBook.Worksheets(1).Range("D32") = txtdye1qty.Text
   oBook.Worksheets(1).Range("D32").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D32").Font.Size = 30
   oBook.Worksheets(1).Range("D32").Font.Bold = True
   oBook.Worksheets(1).Range("D32").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(32, 4).NumberFormat = "0.000  000"
   End With
160
   
 'FOR DYE2 NAME - B33-
 If txtdye2per.Text = "0.000" Then GoTo 170
 
   oBook.Worksheets(1).Range("B33") = txtdye2.Text
   oBook.Worksheets(1).Range("B33").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B33").Font.Size = 30
   oBook.Worksheets(1).Range("B33").Font.Bold = True
   oBook.Worksheets(1).Range("B33").Font.Name = "Verdana"
 
   
 'FOR DYE2 PER - C33-
   oBook.Worksheets(1).Range("C33") = txtdye2per.Text
   oBook.Worksheets(1).Range("C33").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C33").Font.Size = 30
   oBook.Worksheets(1).Range("C33").Font.Bold = True
   oBook.Worksheets(1).Range("C33").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(33, 3).NumberFormat = "0.000 000"
   End With
     
   txtDye1unit(1).Visible = True
   oBook.Worksheets(1).Range("A33") = txtDye1unit(1).Text
   oBook.Worksheets(1).Range("A33").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A33").Font.Size = 20
   oBook.Worksheets(1).Range("A33").Font.Italic = True
   oBook.Worksheets(1).Range("A33").Font.Name = "Verdana"
   txtDye1unit(1).Visible = False
   txtdye2rate.Visible = True
  
     

 'FOR DYE2 QTY - D33-
  
   oBook.Worksheets(1).Range("D33") = txtdye2qty.Text
   oBook.Worksheets(1).Range("D33").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D33").Font.Size = 30
   oBook.Worksheets(1).Range("D33").Font.Bold = True
   oBook.Worksheets(1).Range("D33").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(33, 4).NumberFormat = "0.000  000"
   End With
   
170
 
   
 'FOR DYE2 NAME - B34-
 
If txtdye3per.Text = "0.000000" Then GoTo 180
  
   oBook.Worksheets(1).Range("B34") = txtdye3.Text
   oBook.Worksheets(1).Range("B34").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B34").Font.Size = 30
   oBook.Worksheets(1).Range("B34").Font.Bold = True
   oBook.Worksheets(1).Range("B34").Font.Name = "Verdana"
 
   
 'FOR DYE2 PER - C34-
   oBook.Worksheets(1).Range("C34") = txtdye3per.Text
   oBook.Worksheets(1).Range("C34").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C34").Font.Size = 30
   oBook.Worksheets(1).Range("C34").Font.Bold = True
   oBook.Worksheets(1).Range("C34").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(34, 3).NumberFormat = "0.000 000"
   End With

   txtDye1unit(2).Visible = True
   oBook.Worksheets(1).Range("A34") = txtDye1unit(2).Text
   oBook.Worksheets(1).Range("A34").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A34").Font.Size = 20
   oBook.Worksheets(1).Range("A34").Font.Italic = True
   oBook.Worksheets(1).Range("A34").Font.Name = "Verdana"
   txtDye1unit(2).Visible = False
   txtdye3rate.Visible = True


 'FOR DYE2 QTY- D34-
  
   oBook.Worksheets(1).Range("D34") = txtdye3qty.Text
   oBook.Worksheets(1).Range("D34").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D34").Font.Size = 30
   oBook.Worksheets(1).Range("D34").Font.Bold = True
   oBook.Worksheets(1).Range("D34").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(34, 4).NumberFormat = "0.000  000"
   End With
   
180
 
   
   
'FOR DYE2 NAME - B35-

If txtdye4per.Text = "0.000000" Then GoTo 190
  
   oBook.Worksheets(1).Range("B35") = txtdye4.Text
   oBook.Worksheets(1).Range("B35").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B35").Font.Size = 30
   oBook.Worksheets(1).Range("B35").Font.Bold = True
   oBook.Worksheets(1).Range("B35").Font.Name = "Verdana"
 
   
 'FOR DYE2 PER - C35-
   oBook.Worksheets(1).Range("C35") = txtdye4per.Text
   oBook.Worksheets(1).Range("C35").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C35").Font.Size = 30
   oBook.Worksheets(1).Range("C35").Font.Bold = True
   oBook.Worksheets(1).Range("C35").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(35, 3).NumberFormat = "0.000 000"
   End With
   
   txtDye1unit(3).Visible = True
   oBook.Worksheets(1).Range("A35") = txtDye1unit(3).Text
   oBook.Worksheets(1).Range("A35").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A35").Font.Size = 20
   oBook.Worksheets(1).Range("A35").Font.Italic = True
   oBook.Worksheets(1).Range("A35").Font.Name = "Verdana"
   txtDye1unit(3).Visible = False
   txtdye4rate.Visible = True

   

 'FOR DYE2 QTY - D35-
  
   oBook.Worksheets(1).Range("D35") = txtdye4qty.Text
   oBook.Worksheets(1).Range("D35").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D35").Font.Size = 30
   oBook.Worksheets(1).Range("D35").Font.Bold = True
   oBook.Worksheets(1).Range("D35").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(35, 4).NumberFormat = "0.000  000"
   End With
   
190
 
   'FOR HEADER DYES B36-
  
   oBook.Worksheets(1).Range("B36") = "TOTAL DYES DEPTH/DYES RATE"
   oBook.Worksheets(1).Range("B36").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("B36").Font.Size = 20
   oBook.Worksheets(1).Range("B36").Font.Bold = True
   oBook.Worksheets(1).Range("B36").Font.Name = "Verdana"
   
   'FOR HEADER TOTAL DEPTH-C36-
   
   oBook.Worksheets(1).Range("C36") = Val(txtdye1per.Text) + Val(txtdye2per.Text) + Val(txtdye3per.Text) + Val(txtdye4per.Text)
   oBook.Worksheets(1).Range("C36").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C36").Font.Size = 25
   oBook.Worksheets(1).Range("C36").Font.Italic = True
   oBook.Worksheets(1).Range("C36").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(36, 3).NumberFormat = "0.000000"
   End With
   
  'FOR HEADER TOTAL DEPTH-C36-
   Dim RATE As String
   RATE = (Val(txtdye1rate.Text) + Val(txtdye2rate.Text) + Val(txtdye1rate.Text) + Val(txtdye1rate.Text)) / 100
   oBook.Worksheets(1).Range("D36") = "RS-" & RATE & "/_"
   oBook.Worksheets(1).Range("D36").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D36").Font.Size = 25
   oBook.Worksheets(1).Range("D36").Font.Italic = True
   oBook.Worksheets(1).Range("D36").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(36, 4).NumberFormat = "0.00"
   End With
   
   
      
  'FOR THE HEADER SALT NAME - B37-
  
 If txtsaltper.Text = "0.000" Then GoTo 200
  
  
   oBook.Worksheets(1).Range("B37") = txtsalt.Text
   oBook.Worksheets(1).Range("B37").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B37").Font.Size = 35
   oBook.Worksheets(1).Range("B37").Font.Name = "Verdana"
   
  'FOR THE HEADER SALT PER -C37-
   
   oBook.Worksheets(1).Range("C37") = txtsaltper.Text
   oBook.Worksheets(1).Range("C37").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C37").Font.Size = 35
   oBook.Worksheets(1).Range("C37").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(37, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(10).Visible = True
   oBook.Worksheets(1).Range("A37") = txtChemB_unit(10).Text
   oBook.Worksheets(1).Range("A37").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A37").Font.Size = 20
   oBook.Worksheets(1).Range("A37").Font.Italic = True
   oBook.Worksheets(1).Range("A37").Font.Name = "Verdana"
   txtChemB_unit(10).Visible = False
   txtsaltrate.Visible = True
   
   
   
  'FOR THE HEADER SALT QTY-D37-
   
   oBook.Worksheets(1).Range("D37") = txtsalttot.Text
   oBook.Worksheets(1).Range("D37").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D37").Font.Size = 35
   oBook.Worksheets(1).Range("D37").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(37, 4).NumberFormat = "0.000"
   End With
200
 'FOR THE HEADER SODA NAME - B38-
 
  If txtsodadper.Text = "0.000" Then GoTo 210
  
   oBook.Worksheets(1).Range("B38") = txtsodad.Text
   oBook.Worksheets(1).Range("B38").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B38").Font.Size = 35
   oBook.Worksheets(1).Range("B38").Font.Name = "Verdana"
   
'FOR THE HEADER SODA PER-C38-
   
   oBook.Worksheets(1).Range("C38") = txtsodadper.Text
   oBook.Worksheets(1).Range("C38").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C38").Font.Size = 35
   oBook.Worksheets(1).Range("C38").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(38, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(11).Visible = True
   oBook.Worksheets(1).Range("A38") = txtChemB_unit(11).Text
   oBook.Worksheets(1).Range("A38").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A38").Font.Size = 20
   oBook.Worksheets(1).Range("A38").Font.Italic = True
   oBook.Worksheets(1).Range("A38").Font.Name = "Verdana"
   txtChemB_unit(11).Visible = False
   txtsodadrate.Visible = True
   
 'FOR THE HEADER SODA QTY-D38-
   
   oBook.Worksheets(1).Range("D38") = txtsodadtot.Text
   oBook.Worksheets(1).Range("D38").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D38").Font.Size = 35
   oBook.Worksheets(1).Range("D38").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(38, 4).NumberFormat = "0.000"
   End With
   
210
   
'FOR THE HEADER CAUSTIC SODA NAME- B39-

If txtcausdper.Text = "0.000" Then GoTo 220
  
   oBook.Worksheets(1).Range("B39") = txtcausd.Text
   oBook.Worksheets(1).Range("B39").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B39").Font.Size = 35
   oBook.Worksheets(1).Range("B39").Font.Name = "Verdana"
      
'FOR THE HEADER CAUSTIC SODA PER-C39-
   
   oBook.Worksheets(1).Range("C39") = txtcausdper.Text
   oBook.Worksheets(1).Range("C39").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C39").Font.Size = 35
   oBook.Worksheets(1).Range("C39").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(39, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(12).Visible = True
   oBook.Worksheets(1).Range("A39") = txtChemB_unit(12).Text
   oBook.Worksheets(1).Range("A39").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A39").Font.Size = 20
   oBook.Worksheets(1).Range("A39").Font.Italic = True
   oBook.Worksheets(1).Range("A39").Font.Name = "Verdana"
   txtChemB_unit(12).Visible = False
   txtcausdrate.Visible = True
   
 'FOR THE HEADER CAUSTIC SODA QTY-D39-
   
   oBook.Worksheets(1).Range("D39") = txtcausdtot.Text
   oBook.Worksheets(1).Range("D39").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D39").Font.Size = 35
   oBook.Worksheets(1).Range("D39").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(39, 4).NumberFormat = "0.000"
   End With
   
220
'FOR THE HEADER AFTER TREATMENT - B40-
  
   oBook.Worksheets(1).Range("B40") = "AFTER TREATMENT"
   oBook.Worksheets(1).Range("B40").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("B40").Font.Size = 25
   oBook.Worksheets(1).Range("B40").Font.Bold = True
   oBook.Worksheets(1).Range("B40").Font.Name = "Verdana"
   
  'FOR THE HEADER AFTER TREATMENT GPL/%- C40-
  
   oBook.Worksheets(1).Range("C40") = "GPL/%"
   oBook.Worksheets(1).Range("C40").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C40").Font.Size = 25
   oBook.Worksheets(1).Range("C40").Font.Bold = True
   oBook.Worksheets(1).Range("C40").Font.Name = "Verdana"
   
 'FOR THE HEADER AFTER TREATMENT GPL/% - D40-
  
   oBook.Worksheets(1).Range("D40") = "QTY"
   oBook.Worksheets(1).Range("D40").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D40").Font.Size = 25
   oBook.Worksheets(1).Range("D40").Font.Bold = True
   oBook.Worksheets(1).Range("D40").Font.Name = "Verdana"
 'FOR THE HEADER A.ACID NAME - B41-
 
 If txtaciddper.Text = "0.000" Then GoTo 230
 
   oBook.Worksheets(1).Range("B41") = txtacidd.Text
   oBook.Worksheets(1).Range("B41").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B41").Font.Size = 35
   oBook.Worksheets(1).Range("B41").Font.Name = "Verdana"
   
'FOR THE HEADER A.ACID PER-C41-

   oBook.Worksheets(1).Range("C41") = txtaciddper.Text
   oBook.Worksheets(1).Range("C41").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C41").Font.Size = 35
   oBook.Worksheets(1).Range("C41").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(41, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(16).Visible = True
   oBook.Worksheets(1).Range("A41") = txtChemB_unit(16).Text
   oBook.Worksheets(1).Range("A41").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A41").Font.Size = 20
   oBook.Worksheets(1).Range("A41").Font.Italic = True
   oBook.Worksheets(1).Range("A41").Font.Name = "Verdana"
   txtChemB_unit(16).Visible = False
   txtaciddrate.Visible = True
   
   
 'FOR THE HEADER A.ACID QTY-D41-
   
  oBook.Worksheets(1).Range("D41") = txtaciddtot.Text
  oBook.Worksheets(1).Range("D41").HorizontalAlignment = myVAlignCenter
  oBook.Worksheets(1).Range("D41").Font.Size = 35
  oBook.Worksheets(1).Range("D41").Font.Name = "Verdana"
  With oExcel.ActiveSheet
  oExcel.ActiveSheet.Cells(41, 4).NumberFormat = "0.000"
  End With
  
230
   
 'FOR THE HEADER SOAP NAME - B42-
 
 If txtwash1per.Text = "0.000" Then GoTo 240
 
   oBook.Worksheets(1).Range("B42") = txtwash1.Text
   oBook.Worksheets(1).Range("B42").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B42").Font.Size = 35
   oBook.Worksheets(1).Range("B42").Font.Name = "Verdana"
   
'FOR THE HEADER SOAP PER-C42-

   oBook.Worksheets(1).Range("C42") = txtwash1per.Text
   oBook.Worksheets(1).Range("C42").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C42").Font.Size = 35
   oBook.Worksheets(1).Range("C42").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(42, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(17).Visible = True
   oBook.Worksheets(1).Range("A42") = txtChemB_unit(17).Text
   oBook.Worksheets(1).Range("A42").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A42").Font.Size = 20
   oBook.Worksheets(1).Range("A42").Font.Italic = True
   oBook.Worksheets(1).Range("A42").Font.Name = "Verdana"
   txtChemB_unit(17).Visible = False
   txtwash1rate.Visible = True
   
 'FOR THE HEADER SOAP QTY-D42-
   
  oBook.Worksheets(1).Range("D42") = txtwash1tot.Text
  oBook.Worksheets(1).Range("D42").HorizontalAlignment = myVAlignCenter
  oBook.Worksheets(1).Range("D42").Font.Size = 35
  oBook.Worksheets(1).Range("D42").Font.Name = "Verdana"
  With oExcel.ActiveSheet
  oExcel.ActiveSheet.Cells(42, 4).NumberFormat = "0.000"
  End With
   
240
   
 'FOR THE HEADER SOAP2 NAME - B43-
 
 If txtwash2per.Text = "0.000" Then GoTo 250
 
   oBook.Worksheets(1).Range("B43") = txtwash2.Text
   oBook.Worksheets(1).Range("B43").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B43").Font.Size = 35
   oBook.Worksheets(1).Range("B43").Font.Name = "Verdana"
   
'FOR THE HEADER SOAP2 PER-C43-

   oBook.Worksheets(1).Range("C43") = txtwash2per.Text
   oBook.Worksheets(1).Range("C43").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C43").Font.Size = 35
   oBook.Worksheets(1).Range("C43").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(43, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(18).Visible = True
   oBook.Worksheets(1).Range("A43") = txtChemB_unit(18).Text
   oBook.Worksheets(1).Range("A43").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A43").Font.Size = 20
   oBook.Worksheets(1).Range("A43").Font.Italic = True
   oBook.Worksheets(1).Range("A43").Font.Name = "Verdana"
   txtChemB_unit(18).Visible = False
   txtwash2rate.Visible = True

   
 'FOR THE HEADER SOAP2 QTY-D43-
   
  oBook.Worksheets(1).Range("D43") = txtwash2tot.Text
  oBook.Worksheets(1).Range("D43").HorizontalAlignment = myVAlignCenter
  oBook.Worksheets(1).Range("D43").Font.Size = 35
  oBook.Worksheets(1).Range("D43").Font.Name = "Verdana"
  With oExcel.ActiveSheet
  oExcel.ActiveSheet.Cells(43, 4).NumberFormat = "0.000"
  End With
  
250
   
'FOR THE HEADER SOAP3 NAME - B44-

If txtwash3per.Text = "0.000" Then GoTo 260
 
   oBook.Worksheets(1).Range("B44") = txtwash3.Text
   oBook.Worksheets(1).Range("B44").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B44").Font.Size = 35
   oBook.Worksheets(1).Range("B44").Font.Name = "Verdana"
   
'FOR THE HEADER SOAP3 PER-C44-

   oBook.Worksheets(1).Range("C44") = txtwash3per.Text
   oBook.Worksheets(1).Range("C44").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C44").Font.Size = 35
   oBook.Worksheets(1).Range("C44").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(44, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(19).Visible = True
   oBook.Worksheets(1).Range("A44") = txtChemB_unit(19).Text
   oBook.Worksheets(1).Range("A44").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A44").Font.Size = 20
   oBook.Worksheets(1).Range("A44").Font.Italic = True
   oBook.Worksheets(1).Range("A44").Font.Name = "Verdana"
   txtChemB_unit(19).Visible = False
   txtwash3rate.Visible = True
  
   
   
 'FOR THE HEADER SOAP3 QTY-D44-
   
  oBook.Worksheets(1).Range("D44") = txtwash3tot.Text
  oBook.Worksheets(1).Range("D44").HorizontalAlignment = myVAlignCenter
  oBook.Worksheets(1).Range("D44").Font.Size = 35
  oBook.Worksheets(1).Range("D44").Font.Name = "Verdana"
  With oExcel.ActiveSheet
  oExcel.ActiveSheet.Cells(44, 4).NumberFormat = "0.000"
  End With
   
260
   
  'FOR THE HEADER N.ACID(BUFFER)NAME - B45-
  
 If txtnacidper.Text = "0.000" Then GoTo 270
  
   oBook.Worksheets(1).Range("B45") = txtnacid.Text
   oBook.Worksheets(1).Range("B45").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B45").Font.Size = 35
   oBook.Worksheets(1).Range("B45").Font.Name = "Verdana"
   
 'FOR THE HEADER N.ACID(BUFFER)PER-C45-
 
   oBook.Worksheets(1).Range("C45") = txtnacidper.Text
   oBook.Worksheets(1).Range("C45").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C45").Font.Size = 35
   oBook.Worksheets(1).Range("C45").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(45, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(20).Visible = True
   oBook.Worksheets(1).Range("A45") = txtChemB_unit(20).Text
   oBook.Worksheets(1).Range("A45").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A45").Font.Size = 20
   oBook.Worksheets(1).Range("A45").Font.Italic = True
   oBook.Worksheets(1).Range("A45").Font.Name = "Verdana"
   txtChemB_unit(20).Visible = False
   txtnacidrate.Visible = True
   
 'FOR THE HEADER N.ACID(BUFFER)QTY -D45-
   
   oBook.Worksheets(1).Range("D45") = txtnacidtot.Text
   oBook.Worksheets(1).Range("D45").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D45").Font.Size = 35
   oBook.Worksheets(1).Range("D45").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(45, 4).NumberFormat = "0.000"
   End With
   
270
   
'FOR THE HEADER A.ACID(FINAL)PER - B46-


If txtdefoamper.Text = "0.000" Then GoTo 280
  
   oBook.Worksheets(1).Range("B46") = txtdefoam.Text
   oBook.Worksheets(1).Range("B46").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B46").Font.Size = 35
   oBook.Worksheets(1).Range("B46").Font.Name = "Verdana"
  
  
'FOR THE HEADER A.ACID(FINAL)PER-C46-
   
   oBook.Worksheets(1).Range("C46") = txtdefoamper.Text
   oBook.Worksheets(1).Range("C46").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C46").Font.Size = 35
   oBook.Worksheets(1).Range("C46").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(46, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(20).Visible = True
   oBook.Worksheets(1).Range("A46") = txtChemB_unit(20).Text
   oBook.Worksheets(1).Range("A46").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A46").Font.Size = 20
   oBook.Worksheets(1).Range("A46").Font.Italic = True
   oBook.Worksheets(1).Range("A46").Font.Name = "Verdana"
   txtChemB_unit(20).Visible = False
   txtdefoamrate.Visible = True
   
          
 'FOR THE HEADER A.ACID(FINAL)QTY-D46-
   
   oBook.Worksheets(1).Range("D46") = txtdefoamtot.Text
   oBook.Worksheets(1).Range("D46").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D46").Font.Size = 35
   oBook.Worksheets(1).Range("D46").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(46, 4).NumberFormat = "0.000"
   End With
   
280
   
   
'FOR THE HEADER FIXING NAME - B47-

If txtfixper.Text = "0.000" Then GoTo 290
  
   oBook.Worksheets(1).Range("B47") = txtfix.Text
   oBook.Worksheets(1).Range("B47").HorizontalAlignment = myVAlignLeft
   oBook.Worksheets(1).Range("B47").Font.Size = 35
   oBook.Worksheets(1).Range("B47").Font.Name = "Verdana"
   
  
   
'FOR THE HEADER  FIXING PER -C47-

   oBook.Worksheets(1).Range("C47") = txtfixper.Text
   oBook.Worksheets(1).Range("C47").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C47").Font.Size = 35
   oBook.Worksheets(1).Range("C47").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(47, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(21).Visible = True
   oBook.Worksheets(1).Range("A47") = txtChemB_unit(21).Text
   oBook.Worksheets(1).Range("A47").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A47").Font.Size = 20
   oBook.Worksheets(1).Range("A47").Font.Italic = True
   oBook.Worksheets(1).Range("A47").Font.Name = "Verdana"
   txtChemB_unit(21).Visible = False
   txtfixrate.Visible = True
  
  
   'FOR THE HEADER FIXING QTY -D47-
   
   oBook.Worksheets(1).Range("D47") = txtfixtot.Text
   oBook.Worksheets(1).Range("D47").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D47").Font.Size = 35
   oBook.Worksheets(1).Range("D47").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(47, 4).NumberFormat = "0.000"
   End With
  
290
  
  'FOR THE HEADER FINISH 1 NAME - B48-
  
  If txtfini1per.Text = "0.000" Then GoTo 300
  
  oBook.Worksheets(1).Range("B48") = txtfini1.Text
  oBook.Worksheets(1).Range("B48").HorizontalAlignment = myVAlignLeft
  oBook.Worksheets(1).Range("B48").Font.Size = 35
  oBook.Worksheets(1).Range("B48").Font.Name = "Verdana"
  
   'FOR THE HEADER FINSIH 1 PER-C48-
   
   oBook.Worksheets(1).Range("C48") = txtfini1per.Text
   oBook.Worksheets(1).Range("C48").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C48").Font.Size = 35
   oBook.Worksheets(1).Range("C48").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(48, 3).NumberFormat = "0.000"
   End With
   
   txtChemB_unit(22).Visible = True
   oBook.Worksheets(1).Range("A48") = txtChemB_unit(22).Text
   oBook.Worksheets(1).Range("A48").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A48").Font.Size = 20
   oBook.Worksheets(1).Range("A48").Font.Italic = True
   oBook.Worksheets(1).Range("A48").Font.Name = "Verdana"
   txtChemB_unit(22).Visible = False
   txtfini1rate.Visible = True
   
  
 'FOR THE HEADER FINISH 1 QTY -D48-
   
   oBook.Worksheets(1).Range("D48") = txtfini1tot.Text
   oBook.Worksheets(1).Range("D48").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D48").Font.Size = 35
   oBook.Worksheets(1).Range("D48").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(48, 4).NumberFormat = "0.000"
   End With
  
300
   
'FOR THE HEADER FINISH 2 NAME - B49-

If txtfini2per.Text = "0.000" Then GoTo 310
  
  oBook.Worksheets(1).Range("B49") = txtfini2.Text
  oBook.Worksheets(1).Range("B49").HorizontalAlignment = myVAlignLeft
  oBook.Worksheets(1).Range("B49").Font.Size = 35
  oBook.Worksheets(1).Range("B49").Font.Name = "Verdana"
    
  

   
 'FOR THE HEADER FINISH 2 PER -C49-
   
   oBook.Worksheets(1).Range("C49") = txtfini2per.Text
   oBook.Worksheets(1).Range("C49").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C49").Font.Size = 35
   oBook.Worksheets(1).Range("C49").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(49, 3).NumberFormat = "0.000"
   End With
  
   txtChemB_unit(23).Visible = True
   oBook.Worksheets(1).Range("A49") = txtChemB_unit(23).Text
   oBook.Worksheets(1).Range("A49").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("A49").Font.Size = 20
   oBook.Worksheets(1).Range("A49").Font.Italic = True
   oBook.Worksheets(1).Range("A49").Font.Name = "Verdana"
   txtChemB_unit(23).Visible = False
   txtfini2rate.Visible = True

   
 'FOR THE COLUMN JOB NO NUMERICAL-D49-
   
   oBook.Worksheets(1).Range("D49") = txtfini2tot.Text
   oBook.Worksheets(1).Range("D49").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D49").Font.Size = 35
   oBook.Worksheets(1).Range("D49").Font.Name = "Verdana"
   With oExcel.ActiveSheet
   oExcel.ActiveSheet.Cells(49, 4).NumberFormat = "0.000"
   End With
  
310
   
'FOR THE JOB NUMBER ALPHABET - B52-
   oBook.Worksheets(1).Range("B52") = "PREPARED BY"
   oBook.Worksheets(1).Range("B52").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("B52").Font.Size = 25
   oBook.Worksheets(1).Range("B52").Font.Bold = True
   oBook.Worksheets(1).Range("B52").Font.Name = "Verdana"
   

  'FOR THE JOB NUMBER ALPHABET - C52-
   oBook.Worksheets(1).Range("C52") = "CHECKED BY"
   oBook.Worksheets(1).Range("C52").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("C52").Font.Size = 25
   oBook.Worksheets(1).Range("C52").Font.Bold = True
   oBook.Worksheets(1).Range("C52").Font.Name = "Verdana"
 
  
   'FOR THE JOB NUMBER ALPHABET - D52-
   
   oBook.Worksheets(1).Range("D52") = "DM"
   oBook.Worksheets(1).Range("D52").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("D52").Font.Size = 25
   oBook.Worksheets(1).Range("D52").Font.Bold = True
   oBook.Worksheets(1).Range("D52").Font.Name = "Verdana"
    
  
 
 'FOR THE JOB NUMBER ALPHABET - E52-
  oBook.Worksheets(1).Range("E52") = "PM"
  oBook.Worksheets(1).Range("E52").HorizontalAlignment = myVAlignCenter
  oBook.Worksheets(1).Range("E52").Font.Size = 25
  oBook.Worksheets(1).Range("E52").Font.Bold = True
  oBook.Worksheets(1).Range("E52").Font.Name = "Verdana"
   
   
   'FOR THE JOB NUMBER ALPHABET - F52-
   oBook.Worksheets(1).Range("F52") = "GM"
   oBook.Worksheets(1).Range("F52").HorizontalAlignment = myVAlignCenter
   oBook.Worksheets(1).Range("F52").Font.Size = 25
   oBook.Worksheets(1).Range("F52").Font.Bold = True
   oBook.Worksheets(1).Range("F52").Font.Name = "Verdana"
   
   
  
   
 'MARGIN SETUP
 
With oExcel.ActiveSheet.PageSetup
.LeftMargin = Application.InchesToPoints(0.3)
.RightMargin = Application.InchesToPoints(0.4)
.TopMargin = Application.InchesToPoints(0.6)
.BottomMargin = Application.InchesToPoints(0.55)
End With


confirm = MsgBox("DO U WANT TO PRINT?", vbYesNo, "PRINT CONFIRMATION")
    If confirm = vbYes Then
GoTo 1000
Else
GoTo 2000
End If
1000

oSheet.PrintOut
2000


Exit Sub
errorhandler:
MsgBox "errornumber:" & Err.Number & vbCrLf & Err.Description, vbInformation, "INFO"
Resume Next


End With
End With
End Sub
:code:

This post has been edited by modi123_1: 27 September 2018 - 12:37 PM
Reason for edit:: In the future, please use the [code] tag button in the editor.


Is This A Good Question/Topic? 0
  • +

Replies To: how to split into multiple sub and print in a single excel sheet

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15228
  • View blog
  • Posts: 60,973
  • Joined: 12-June 08

Re: how to split into multiple sub and print in a single excel sheet

Posted 27 September 2018 - 12:37 PM

Please copy/paste the exact message here.
Was This Post Helpful? 0
  • +
  • -

#3 maj3091   User is offline

  • D.I.C Lover
  • member icon

Reputation: 331
  • View blog
  • Posts: 2,005
  • Joined: 26-March 09

Re: how to split into multiple sub and print in a single excel sheet

Posted 28 September 2018 - 01:54 AM

As the error states, you've got too much in a single procedure.

Try breaking it down into small procedures instead of having all that code in one.
Was This Post Helpful? 0
  • +
  • -

#4 andrewsw   User is offline

  • never lube your breaks
  • member icon

Reputation: 6813
  • View blog
  • Posts: 28,190
  • Joined: 12-December 12

Re: how to split into multiple sub and print in a single excel sheet

Posted 28 September 2018 - 02:16 AM

You can operate on more than one or two cells at a time!

You should consider creating a template with the desired layout and formatting and just use the template as the basis for new workbook(s).
Was This Post Helpful? 0
  • +
  • -

#5 andrewsw   User is offline

  • never lube your breaks
  • member icon

Reputation: 6813
  • View blog
  • Posts: 28,190
  • Joined: 12-December 12

Re: how to split into multiple sub and print in a single excel sheet

Posted 28 September 2018 - 02:25 AM

You don't need to do nonsense like this:

.Range("B3:G3").Borders(xlEdgeTop).LineStyle = xlContinuous
.Range("B4:G4").Borders(xlEdgeTop).LineStyle = xlContinuous
.Range("B5:G5").Borders(xlEdgeTop).LineStyle = xlContinuous
.Range("B6:G6").Borders(xlEdgeTop).LineStyle = xlContinuous
.Range("B7:G7").Borders(xlEdgeTop).LineStyle = xlContinuous
.Range("B8:G8").Borders(xlEdgeTop).LineStyle = xlContinuous
.Range("B9:G9").Borders(xlEdgeTop).LineStyle = xlContinuous
.Range("B10:G10").Borders(xlEdgeTop).LineStyle = xlContinuous
.Range("B10:G10").Borders(xlEdgeTop).LineStyle = xlContinuous

you can just do

Range("B2:G10").Borders(xlInsideHorizontal).LineStyle = xlContinuous

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1