Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 11-23-2006, 05:02 PM   #1 (permalink)
Salchester
Salchester
 
Salchester's Avatar
 
Join Date: Jul 2005
Location: In a house
Posts: 230
Salchester is an unknown quantity at this point
Save/Open String Ascii Codes

Hi Everyone,

How can the following functions be edited inorder to save the ascii values of a string within a textbox called "textbox1", and then open it again?

Code:
Private Sub mnuOpen_Click()
  CD.DialogTitle = "Open Weight Board"
  CD.ShowOpen
  filename = CD.filename
  If CD.filename <> "" Then
    Open filename For Random As #1 Len = Len(record(1))
      numberofrecords = LOF(1) / Len(record(1))
      ReDim Preserve record(numberofrecords + 1)
      For row = 1 To numberofrecords
        Get #1, row, record(row)
          cboWeather.Text = record(row).weather
          lvwBoard.ListItems.Add , , lvwBoard.ListItems.Count + 1
          lvwBoard.ListItems(row).SubItems(1) = RTrim(record(row).name)
          lvwBoard.ListItems(row).SubItems(2) = RTrim(record(row).species)
          lvwBoard.ListItems(row).SubItems(3) = RTrim(record(row).sex)
      Next row

    Close #1
    row = row + 1
  End If
End Sub

Private Sub mnuSaveAs_Click()
  row = 0
  CD.DialogTitle = "Save Weight Board"
  CD.filename = Format(Date, "dd-mm-yyyy")
  CD.ShowSave
  filename = CD.filename
  numberinlist = lvwBoard.ListItems.Count
  If CD.filename <> "" Then
    Open filename For Random As #1 Len = Len(record(1))
      For row = 1 To numberinlist
        Put #1, , record(row)
      Next row
    Close #1
    row = row + 1
  End If
End Sub
Many Thanks,
__________________
Many Thanks, in advance!

Salchester.
The Future Is Here - Are You Ready?
Salchester is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help for another program Androto Standard C, C++ 54 10-15-2004 07:21 AM
sorting objects arrays by object properties sde Java 28 08-05-2004 05:51 AM
From C to Java HighterDK Java 11 07-13-2004 07:15 PM


All times are GMT -8. The time now is 01:33 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting