This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Calculator Programming subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. General Coding and Design => Calculator Programming
Author Message
SniperOfTheNight


Advanced Member


Joined: 24 May 2003
Posts: 260

Posted: 23 Oct 2003 02:48:05 pm    Post subject:

I'm having a little trouble. In VB, I'm doing a prorgram that's suppose to work like notepad, you can type up text files, save them, open them, ect and I'm having a little problem. Whenever I do Open, it always gives me an error. Here's my code (btw, I'm using 'Open' in a drop down menu and a Textbox callled txtEdit)


Code:
Sub mnuOpen_Click ()
Dim strFn as String
strFn = UCase$(Trim$(InputBox("Filename" , "Open File")))
MsgBox strFn
Open strFn For Input as #1
Dim FileSize as Integer
FileSize = LOF(1)
txtEdit = Input$(FileSize, #1) 'this is where I usually get the error
Close #1
End Sub


Any help is appreciated. Thanks alot Smile


Last edited by Guest on 23 Oct 2003 02:49:17 pm; edited 1 time in total
Back to top
JoeImp
Enlightened


Active Member


Joined: 24 May 2003
Posts: 747

Posted: 23 Oct 2003 03:37:58 pm    Post subject:

I dont usually waste my time with VB. I have a notebook type prog on my laptop, next time Im on it, Ill grab it.

Imp
Back to top
SniperOfTheNight


Advanced Member


Joined: 24 May 2003
Posts: 260

Posted: 23 Oct 2003 04:18:05 pm    Post subject:

Thanks. I'm only taking it because I needed an easy class @ scool this year cause I needed a break during the skool day.
Back to top
sgm


Calc Guru


Joined: 04 Sep 2003
Posts: 1265

Posted: 23 Oct 2003 09:52:47 pm    Post subject:

I tried a QBasic derivative of that and it worked fine. Uh, AFAIK (IIRC?) a lot of stuff in VB are TYPEs. Maybe you need to do something like txtedit.contents = input$(filelen,1)?
Back to top
JoeImp
Enlightened


Active Member


Joined: 24 May 2003
Posts: 747

Posted: 24 Oct 2003 05:21:22 pm    Post subject:

Sorry, didnt use my laptop yesterday, Ill have it here by tomorrow morning/afternoon depending on when I wake up. (Which can be from 6:00AM - 4:00pm) :P

Imp
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement