SHARE
TWEET

Source Code For Next Untuk MS Excel

stevennathaniel Jan 26th, 2016 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Imports Excel = Microsoft.Office.Interop.Excel
  2.  
  3. Imports Microsoft.Office
  4.  
  5. Public Class Form6
  6.  
  7.     Dim appXL As Excel.Application = Nothing
  8.  
  9.     Dim wbXL As Excel.Workbook = Nothing
  10.  
  11.     Dim shXL As Excel.Worksheet = Nothing
  12.  
  13.     Dim raXL As Excel.Range = Nothing
  14.  
  15.     Dim i As Integer
  16.  
  17.  
  18.     Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
  19.  
  20.         appXL = New Excel.Application
  21.  
  22.         wbXL = appXL.Workbooks.Open("D:\fileExcel\Latihan100.xlsx")
  23.  
  24.         shXL = wbXL.Worksheets("Sheet2")
  25.  
  26.         shXL.Activate()
  27.  
  28.         appXL.Visible = True
  29.  
  30.         For i = 1 To 6
  31.  
  32.             shXL.Cells(i, 1) = 100
  33.         Next
  34.  
  35.  
  36.  
  37.     End Sub
  38. End Class
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top