SHARE
TWEET

Untitled

a guest Jul 17th, 2017 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. xlApp.Workbooks.Open(ruta)
  2.     xlWorkBook = xlApp.ActiveWorkbook
  3.     xlWorkSheet = xlWorkBook.ActiveSheet
  4.  
  5.  
  6.     With xlWorkSheet
  7.  
  8.         xlWorkSheet.Range("B9:D9").MergeCells = True
  9.         xlWorkSheet.Range("E9:G9").MergeCells = True
  10.         xlWorkSheet.Range("H9:J9").MergeCells = True
  11.         xlWorkSheet.Range("K9:M9").MergeCells = True
  12.         xlWorkSheet.Range("N9:P9").MergeCells = True
  13.  
  14.         xlWorkSheet.Cells(9, 2).Value = "Dedo 1"
  15.         'xlWorkSheet.Cells(9, 5).Value = "Dedo 2"
  16.         'xlWorkSheet.Cells(9, 8).Value = "Dedo 3"
  17.         'xlWorkSheet.Cells(9, 11).Value = "Dedo 4"
  18.         'xlWorkSheet.Cells(9, 14).Value = "Dedo 5"
  19.  
  20.         xlWorkSheet.Cells(9, 2).Value = "Pos."
  21.         xlWorkSheet.Cells(9, 3).Value = "Galga D"
  22.         xlWorkSheet.Cells(9, 4).Value = "Galga T"
  23.         'xlWorkSheet.Cells(9, 5).Value = "Pos."
  24.         'xlWorkSheet.Cells(9, 6).Value = "Galga D"
  25.         'xlWorkSheet.Cells(9, 7).Value = "Galga T"
  26.         'xlWorkSheet.Cells(9, 8).Value = "Pos."
  27.         'xlWorkSheet.Cells(9, 9).Value = "Galga D"
  28.         'xlWorkSheet.Cells(9, 10).Value = "Galga T"
  29.         'xlWorkSheet.Cells(9, 11).Value = "Pos."
  30.         'xlWorkSheet.Cells(9, 12).Value = "Galga D"
  31.         'xlWorkSheet.Cells(9, 13).Value = "Galga T"
  32.         'xlWorkSheet.Cells(9, 14).Value = "Pos."
  33.         'xlWorkSheet.Cells(9, 15).Value = "Galga D"
  34.         'xlWorkSheet.Cells(9, 16).Value = "Galga T"
  35.  
  36.         xlWorkSheet.Columns("B:P").AutoFit()
  37.  
  38.  
  39.         xlWorkSheet.Cells(a, 2).Value = TrackBar1.Value
  40.         xlWorkSheet.Cells(a, 3).Value = TrackBar6.Value
  41.         xlWorkSheet.Cells(a, 4).Value = TrackBar7.Value
  42.  
  43.         'xlWorkSheet.Cells(9, 5).Value = TrackBar5.Value
  44.         'xlWorkSheet.Cells(9, 6).Value = TrackBar15.Value
  45.         'xlWorkSheet.Cells(9, 7).Value = TrackBar14.Value
  46.  
  47.         'xlWorkSheet.Cells(9, 8).Value = TrackBar4.Value
  48.         'xlWorkSheet.Cells(9, 9).Value = TrackBar8.Value
  49.         'xlWorkSheet.Cells(9, 10).Value = TrackBar9.Value
  50.  
  51.         'xlWorkSheet.Cells(9, 11).Value = TrackBar3.Value
  52.         'xlWorkSheet.Cells(9, 12).Value = TrackBar10.Value
  53.         'xlWorkSheet.Cells(9, 13).Value = TrackBar11.Value
  54.  
  55.         'xlWorkSheet.Cells(9, 14).Value = TrackBar2.Value
  56.         'xlWorkSheet.Cells(9, 15).Value = TrackBar12.Value
  57.         'xlWorkSheet.Cells(9, 16).Value = TrackBar13.Value
  58.     End With
  59.  
  60.     'xlApp.DisplayAlerts = False
  61.     'xlWorkBook.Save()
  62.     'xlApp.Workbooks.Close()
  63.  
  64.     'xlApp.Quit()
  65.     a = a + 1
  66.    
  67. If (MessageBox.Show("Desea guardar los datos?", "Guardar", MessageBoxButtons.YesNo, MessageBoxIcon.Information) = DialogResult.Yes) Then
  68.     xlWorkBook.Save()
  69.     xlApp.Workbooks.Close()
  70.     xlApp.Quit()
  71.  End If
RAW Paste Data
Top