Results 1 to 3 of 3

Thread: v.b6 main simple mark sheet ki coding chahiye

  1. #1
    Join Date
    18 Jun 2010
    Location
    karachi
    Age
    33
    Gender
    Male
    Posts
    344
    Threads
    80
    Credits
    8
    Thanked
    22

    Default v.b6 main simple mark sheet ki coding chahiye

    assalam o alikum
    mujhe koi visual basic main simple marksheet ki coding de sakta hai??

  2. #2
    irtekaz's Avatar
    irtekaz is offline Senior Member+
    Last Online
    10th June 2013 @ 10:56 AM
    Join Date
    09 Aug 2009
    Location
    India
    Gender
    Male
    Posts
    484
    Threads
    64
    Credits
    950
    Thanked
    64

    Default

    .......

  3. #3
    irtekaz's Avatar
    irtekaz is offline Senior Member+
    Last Online
    10th June 2013 @ 10:56 AM
    Join Date
    09 Aug 2009
    Location
    India
    Gender
    Male
    Posts
    484
    Threads
    64
    Credits
    950
    Thanked
    64

    Default

    وعلیکم السلام

    Some try........

    ' declare these variables & you need to add a reference
    ' to the microsoft excel 'xx' object library.

    ' you need two command buttons: cmdCopy and cmdSave
    ' on the form, an excel file in c:\book1.xls

    Dim xl As New Excel.Application
    Dim xlsheet As Excel.Worksheet
    Dim xlwbook As Excel.Workbook

    Private Sub cmdCopy_Click()

    Dim temp As String

    temp = xlsheet.Cells(1, 1) ' row 1 col 1

    ' TODO: process the value stored in the variable 'temp'
    temp = temp & "-changed" ' in this case "<Sheet1-CellA1-value>-changed"

    ' Open Sheet2
    Set xlsheet = xlwbook.Sheets.Item(2)
    ' write the value to cell A1 on Sheet2
    xlsheet.Cells(1, 1) = temp

    End Sub

    Private Sub cmdSave_Click()
    xlwbook.Save
    ' You MUST do this or you will not be able to open
    ' c:\book1.xls again, untill you restart Windows OR
    ' kill EXCEL.EXE with the Task Manager
    xl.ActiveWorkbook.Close False, "c:\book1.xls"
    xl.Quit
    End Sub

    Private Sub Form_Load()
    Set xlwbook = xl.Workbooks.Open("c:\book1.xls")
    Set xlsheet = xlwbook.Sheets.Item(1)
    End Sub

    Private Sub Form_Unload(Cancel As Integer)
    Set xlwbook = Nothing
    Set xl = Nothing
    End Sub

Similar Threads

  1. Replies: 17
    Last Post: 11th April 2018, 11:55 AM
  2. My Own Hacking History Life
    By irfan_acca in forum Baat cheet
    Replies: 43
    Last Post: 3rd September 2015, 06:02 PM
  3. Main baghi hon main baghi hon
    By 12rounds in forum Urdu Adab & Shayeri
    Replies: 10
    Last Post: 9th April 2015, 08:37 PM
  4. Shezan Ki Masnooat Ka Baikat Kejiye
    By Fasih ud Din in forum Khatm-e-Nabuwat
    Replies: 132
    Last Post: 21st September 2014, 06:26 PM
  5. Replies: 3
    Last Post: 10th November 2013, 10:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •