Outputting Strings To A Text File
Hiya, what I want to do is output a series of string variables to a simple .txt file. I know how to do this, but the problem is it outputs the "" marks as well. I want to get rid of these as they can't be read by another program that reads the text file. However the program I'm writing must be able to read the values in the file back as strings. Can anyone help?Thanx in advance,Matt
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Outputting Strings To Human Readable Text
How to I output strings as readable text in notepad
i'm using this type of output
Open "c:currentList.txt" For Random As #1 Len = 1000
put #1, 1, variable1
close #1
but this outputs as... machine language..?
Outputting To A Text File
Lo all, i'm new to this so try to bare with me
I've been creating a DataBased based program for
storing people's details. I won't bore you with the details
but its basically a fancy AddressBook with new fields etc.
Could anyone tell me how to create a button that would save
all (or just the current) database entry to a text file?
Its basically so we can print the details off easier without
using "Me.Print" etc.
If its required I can post the source files in a .zip or .rar.
Outputting To A Text File
Hi Everyone,
The below code is working execept for the fact that it is only displaying the very end of the data. "List1" is the name of my textbox. I have the multiline value set to true. How can I make it display all the data into a text box? Thank you.
VB Code:
If Not (IsEmpty(arrkeynames)) ThenFor Each subkey In arrkeynamesregpath = strkey & "Network" & subkeyregentry = "RemotePath"objreg.getstringvalue HKEY_USERS, regpath, regentry, dapath list1 = subkey & ":" & vbTab & dapath & vbNewLine
Outputting To A Text File.
Hi,
Does anyone have any tips (or know of any good web sites/tutorials) for neatly formatting text in an output file (.txt). I'm finding it difficult to get everything lined up with headers, and because some of the bits of data are of different length, all the bits of data in my tables are out of position.
TYIA
Pile
Outputting To Existing Text File
I am a novice programmer.
How do I output the text appearing on a label so that it outputs to an existing text file exactly as it appears on a label?
This is what I have done so far.
Private Sub PurchaseCmd_Click()
Open "D:Documents and SettingsChris LatinoDesktopProjUnmodifiedProjectpao.dat" For Append As #1
Write #1, receipt.Text
Close #1
End Sub
If Statements - Text File Outputting?
I have a program which reads a text file, line by line, then outputs certains lines to a new text file. Heres an example of a 2 lines in my text file.
H 623556348762 company1
D93
D08
H 623556898798 Company2
D08
D01
D34
Each record begins with a H, therefore in the above example i have 2 records. When the code reads the text file, it outputs those records when D08 comes last in the lines, see record 1 above(company1). BUT when D08 comes in the middle of the record it does not get outputted, see record 2, company2. So if theres a D01 or any other line after a D08 line it ignores my Rule to output.
WHY is this happening to me?!! Ive pasted the IF Statements below which take care of the selection criteria. Basically, i need to output all records which have a D08 line , no matter of its position within the record.
Thanks
xx
Paste the code below into a text file to make it more readable.
'' if this record is still okay
''
If useThisRecord Then
'' now check through line by line to see if it contains a D93 record
''
For j = 0 To UBound(strRecord)
'' if there is in fact a D93 record, then check if there's a P field
''
If Left(strRecord(j), 3) = "D93" Then
'' if there is a P at position 62 then this record is not okay
''
useThisRecord = Not (Mid$(strRecord(j), 62, 1) = "P")
If Left(strRecord(j), 3) = "D12" Or Left(strRecord(j), 3) = "D08" Or Left(strRecord(j), 3) = "D93" And Mid$(strRecord(j), 62, 1) = "S" Then
useThisRecord = True
End If
End If
'End If
Next
End If
Need Assistance In Outputting To A Text File
Hello to all,
I have a text file with customers names and their purchases over a 5 month period.
It would look like similar to whats below:
"Name", "M1", "M2", "M3", "M4", "M5"
"Harry Jones", 250, 300, 450, 100, 250
"Henny Penny", 100, 200, 150, 300, 250
"Tom Mack", 110, 320, 150, 345, 430
"Jenn Street", 320, 280, 450, 320, 840
"Mary Jacobs", 430, 350, 700, 630, 290
Using VB6 and reading this text file, lets call it customers.txt, how can I output each customers name with their calculated total purchases into another textfile lets call it custtot.txt that would look like this:
Customer name Total purchases for 5 months
"Harry Jones" 1350
"Henny Penny" 1000...
Does this make sense??
Basically I want to be able to calculate their total purchases from the input text file using VB6 and then output these calculated totals to another text file.
What is the quickest & easiest way to do this??
Thanks for any help I may get!
Cheers!
Opening Text File, Outputting It To Textbox
How do I open a textfile, and have it's contents outputed to a textbox? The path must be file.ext .. I looked at some of the tutorials but didn't find a direct example, tried
Dim checkfile As String
Open App.Path & "conf.cfg" For Random As checkfile
txt1.Text = checkfile
which didn't do anything, was a longshot : ... also conf.cfg, textfile saved with the extension .cfg, shouldn't be problem ...
Outputting Data From A Datagrid Into A Text File?
How would you go about this. I have never made a report before so I was wondering if you could tell me the best way to do this. I have a datagrid that contains data, it is logs of events happening in my program, like login, logout, etc, and I am trying to create a function so the user can export the logs to a text file. If you could help I would be very grateful
Thanks
Help On Outputting Text File From Excell Cell
I am trying to output the text in excell cells.
For example how do you output text file
A B
1 2 Hello
2 5 Hi
3 28 Good
How can I output a tex file containing B1 with the
file title of A1. I also want to make separate text
files for each row.
Any advice of Help would be appriciatted
Thanks
Kuni
Help Outputting Text File Info To A Listbox
Ok, so I've come up with a program that reads in a list of names and sorts them in ascending or descending order according to the option buttons selected by the user. The only problem is I'm having some trouble outputting this information to a list box so I have no idea if my program works or not. I was hoping maybe someone could tell me what it is that I need to do to get this to output. Could it have something to do with the People subroutine?
Thanks in advance!
Text Align When Outputting To Text File
I have three variables here: item number, description, and price. Each line can be a maximum of 50 characters. I need the first two variables left aligned and the last one right aligned on the same line when outputting to a text file, so it looks like:
Code:
01234567890123456789012345678901234567890123456789
itemno description, color price
I already wrote functions for right alignment but I cannot figure out how to have two different alignments when outputting to the text file on the same line. Anyone have any ideas? Thanks.
Outputting Text To A Text File With Quotes " "
Hello,
I do not know what to search under in google for this.
I want to write to a text file a few lines like "hello" (It won't really say hello, that is an example).
However, in VB the Print #1, "blagggggg" doesn't like Print #1, ""Hello""
How do I complete this?
Thank you,
Scott
2D Strings Compare Large Text File With Dat File
Hi
i am trying to compare a search a large server.log for listings stored in a dat file
one by one.
so
dat file listing like this
mr a
mr b
mr c
then look in the server log file line by line for mr a, mr b and then mr c then if say at line 20 a hit on mr c is found stop, perform a task then resume the search till the next hit or till the end of the log
also as the server log is constantly updated i want a way to remember last postition and only scan the new additions to the log not the whole thing over and over
not asking for some one to hand it to me on a plate as i want to learn this as i go but allmost idiot proof examples of code would be very much welcome
thanks again
Text File Strings Help Me
I ask for simple help. I'm at a part of my application where I need it to open
a text file, and search for id numbers within the text. There will be several instances of "id=######"s that I will need to grab from the text file, and put them line by line into another box so that I'm able to save just those id's that i want.
so... here's what I need for my program to do: Open .txt, find just the number part of the "id=xxxxxx", and put them one by one into another text field so that i'm able to save them as another text file, keeping just the ripped strings that contains the ids, ya know? I hope i'm making sense.. any help would be greatly appreciated.
Text File Strings Help Me
I ask for simple help. I'm at a part of my application where I need it to open
a text file, and search for id numbers within the text. There will be several instances of "id=######"s that I will need to grab from the text file, and put them line by line into another box so that I'm able to save just those id's that i want.
so... here's what I need for my program to do: Open .txt, find just the number part of the "id=xxxxxx", and put them one by one into another text field so that i'm able to save them as another text file, keeping just the ripped strings that contains the ids, ya know? I hope i'm making sense.. any help would be greatly appreciated.
Text File Strings Help Me
I ask for simple help. I'm at a part of my application where I need it to open a text file, and search for id numbers within the text. There will be several instances of "id=######"s that I will need to grab from the text file, and put them line by line into another box so that I'm able to save just those id's that i want.
so... here's what I need for my program to do: Open .txt, find just the number part of the "id=xxxxxx", and put them one by one into another text field so that i'm able to save them as another text file, keeping just the ripped strings that contains the ids, ya know? I hope i'm making sense.. any help would be greatly appreciated.
Basic Text File I/O Strings
I'm fairly new to VB, and I don't have the help files (btw, if anyone has a suggestion to a replacement for the MSDN help files, please tell me!!!!), so this is a very stupid, beginner's question, sorry.
Basically, how do I write to and read from basic text files? If the commands are identical to QBasic/QuickBasic, that's not a problem, I know QBasic a lot better, but if not...I'd like to know what they are and, if possible, any differences between them and Qbasic...
GothGeek84 wishes he had the help files so he wouldn't have to ask stupid questions...;-)
Write 2 Strings To Text File
hey
how do you write
txtText.Text = Join$(strWords(), " ") and the results of
Dim i As Integer
word = ""
For i = 0 To 9
word = word & " " & siWordCountedWords(i)
Next i
word = Trim(word) 'remove leading space
to the same text file?
i want something like:
word1 0 word2 1 word3 2
cat sat mat
to display in one text file but the two strings come from different origins
How To Use A Text File To Store Strings
I have a program from a friend that uses regular text files to store info, because when you close a program the only way to save info is in some kind of database. I took a vb course in high school but we never got to databasing, so can anyone tell me the basics, that way I can understand the rest of the coding in here.
How Do I Get Strings From A Text File Using Vb6 Or Vba Then Add Them To Excel
Is there a way to read specific strings from a text file then add them to Microsoft Excel XP using VB6 or VBA? I want to get specific words from a text file then add them to excel, the text file contents has no common delimiter so I can't add them to excel as is. Here is an example:
B/L NO. 123123123 TABLE CODE TRANSLATION TABLE CODE TRANSLATION
CONSIGNEE: CONSIGNEE
401108277 NAME: KUEHNE & NAGEL ENTERED: NAME: KUEHNE + NAGEL W.L.L.
I want to get the numbers from the B/L NO. only(123123123) and the name: KUEHNE & NAGEL then add them to a column in excel. Is this possible?
Isolating Text Strings From A File
Howdee all !
I have an application that hacks down a text file for viewing/db import. While its working now(with help from folks here, thanks !) I have a new problem. one field that already gets seperated out for display/view needs to be refined further.
There is a general text "block" that has to be seperated into three seperate text strings so the DB import can put them into the appropriate fields. The three strings have their own desiginator characters, and I thought I would just parse the string then hold them into seperate memory spaces via varible declarations in the import sub function. Problem is, I'm not sure how parse/seperate the text in VB6 because I'm THAT much of a newbie.
The seperators are -
No characters is the basic problem description that comes in originally.
XXX denotes update remarks for the particular entry.
/// OR \ denotes a close to the entry in question.
EXAMPLE -
Original problem gets listed, it's usually a fairly short string. XXX Problem gets some sort of update text. XXX Maybe some more update text gets added here. /// Then they close the problem report for that particular entry like this.
Can anyone explain to me how to pull this off?
John
Search For Strings In A Text File Using FSO
Hi,
I am using a FileSystemObject to read and write to a text file. I have to look for a particular string in the text file. Is there any way
I can look for a particular string in the text file.
thanks in advance,
Regards,
Radhika
Reading Strings From A Text File
I have the following info in a text file:
dayAhead 1
weekend 3
juneBon 7
summer01 23
there is a space between the string and the number.
how do i read the string into 1 variable and the number into a different one.
Thanks
Nick
Delete Strings From A Text File
what i want to do is use a text file with a .zan extention to store users in, thats no problem. but when i want to delete a user i get all users deleted. here is the code I'm using...
Option Explicit
Private Sub cboUser_KeyPress(KeyAscii As_ Integer)
'don't allow the user to type in the
' combo
cboUser.Text = ""
End Sub
Private Sub cboUser_KeyUp(KeyCode As_ Integer, Shift As Integer)
'make sure the user can't type
cboUser.Text = ""
End Sub
Private Sub DelUser()
'sub to search for user name in my txt
' file
Dim intStart As Integer, intPos As_ Integer, intResponse As Integer, intOffSet_ As Integer
Dim strFindString As String,_ strSourceString As String
'Start from the top
frmDel.txtUsers.SetFocus
frmDel.txtUsers.SelStart = 0
intOffSet = 1
intStart = frmDel.txtUsers.SelStart + 1
strFindString = frmDel.cboUser.Text
strSourceString = frmDel.txtUsers.Text
intPos = InStr(intStart + 1,_ strSourceString, strFindString)
If intPos Then
'if the string comes after the first
'line....
frmDel.txtUsers.SelStart = intPos - 1
frmDel.txtUsers.SelLength = Len_(strFindString)
frmDel.txtUsers.SelText = ""
SendKeys "{BKSP}" ' make sure there
' are no empty lines
Else
'if the string is on the first
' line....
frmDel.txtUsers.SelStart = intPos
frmDel.txtUsers.SelLength = Len_(strFindString)
frmDel.txtUsers.SelText = ""
SendKeys "{DEL}"
End If
End Sub
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdDel_Click()
If cboUser.Text = "" Then
MsgBox "Please select a user to_ remove.", , "Error"
Exit Sub
End If
Dim I As Integer
For I = 1 To 20
'check to see if the user has to
'remain
If Cn.mnuMsg(I).Caption =_ cboUser.Text Then
MsgBox "You can't delete this_ user until all there Msg's have been_ viewed", , "Error"
Exit Sub
End If
Next
If txtPass.Text = "" Then
'make sure there is a password
MsgBox "Please enter your_ password.", , "Error"
Exit Sub
End If
Dim pass As String, cPass As String
'get the user pass from the reg (eww_ secure Not)
pass = GetSetting(AppTitle, "Users",_ cboUser.Text)
cPass = txtPass.Text
'compare the pWords
If pass = cPass Then
Call DelUser
'delete the users pWord from reg
DeleteSetting AppTitle, "Users",_ cboUser.Text
'update user file
Open App.Path & "Users.zan" For_ Output As #1
Print #1, txtUsers.Text
Close #1
Else
MsgBox "Please re-enter your_ password", , "Invalid Password"
Exit Sub
End If
End Sub
Private Sub Form_Load()
frmZoomToFromTray Me, ZoomFormOpen,_ FromCenter, False
KillX Me
'load my user file into the txtbox to
'work with
LoadComboBox App.Path & "Users.zan",_ cboUser
End Sub
Private Sub Form_Unload(Cancel As Integer)
frmZoomToFromTray Me, ZoomFormClosed,_ FromCenter, False
End Sub
ok pasting it into this box threw it out of whack but i think i fixed all the wrapped lines. it worked fine until i tried it a minute ago. If anybody has a better way to store the Passwords fill me in. I origanly went ini but the passwords would match and my program couldn't tell even after i trimed the ini's return
thanks
Re-arranging Strings In A Text File
Hi all,
I am having some problems in VB writing a function that will format text.
I have a small text file which looks like:
Smith John HIS GEO ENG MUS GST 06/03/85
Blake Nathan MAT HIS MUS
Hunter Matt GER PHY 12/12/86
I need to write a function that will format it so it looks like:
FIRST NAME SURNAME DOB AS1 AS2 AS3 AS4 AS5
John Smith 06/03/85 HIS GEO ENG MUS GST
Nathan Blake MAT HIS MUS
Matt Hunter 12/12/86 GER PHY
I have written it so that it can open the text file and read it but I am having problems formatting it. The function I have written so far is below:
Code:
Function formatline(aline As String) As String
Open filename For Input As #1
Print #2, "FIRST NAME"; Space(5) & "SURNAME" & Space(5) & " DOB " & Space(4) & "AS1" & Space(2) & "AS2" & Space(2) & "AS3" & Space(2) & "AS4" & Space(2) & "AS5"
While Not EOF(1)
Line Input #1
End Function
There is where I'm stuck. Yes, I realise this is terrible code but I'm a complete newbie and this is urgent I'm afraid so I'm only doing what I know. What I need to do is find right strings(?) and put them under the correct headers. I need the firstname to use columns 1 to 15 (hence, all the spacing), surname 16 to 30, DOB 31 to 40, AS1 41 to 45, AS2 46 to 50, AS3 51 to 55, AS4 56 to 60, and AS5 61 to 65.
Thanks everyone!
Edit - I'm going to guess its something to do with either strLine, intStr, tab or something like that. I've been searching around but I haven't been able to work it out
Edited by - ntrik on 4/29/2004 4:10:08 PM
How To Read Strings From A Text File
I want to read indivisual character strings in a single row from a text file. The strings are separated by white space. What command is available in VB to read those strings. I dont want to use Line Input to read entire line and then break-up that line into individual strings.
Help me.
thanks in advance
AmritPalSingh
MTech Production
IIT Delhi
India
110029
Write Series Of Strings To A Text File
I was trying to write lines like this:
string1,string2,string3...
But the problem is that with the Write method, the file is set like this:
"string1","string2","string3"...
I haven't found a way to remove them from there, any ideas?
Thanks,
How To Count Similar Strings In Text File
I have difficulties, its look simple but hard to implement
My input file has the followings:
chicken
chicken
cow
buffallo
buffallo
buffallo
lamb
lamb
...
...
How to code in VB to count the occurance/frequency of similar strings from the file? I dont prefer to use array. The output should look like this
chicken 2
cow 1
buffallo 3
...
Thanks
Outputting Text To Net Term
I'm writing code that needs to export data to a text file, but I'm unable to get it to export quotation marks.
For example, I need the text file to read:
Output "rcv:apptext!"
but the code is exporting:
Output rcv:apptext!
I've tried the print to file and write to file commands and neither seem to work. Thanks for your help!
Outputting Text Lines?
I have a text file which contains lines of data. I only need to output certain lines based on the following criteria:-
Each new record begins with "H", ie header record. Then within each header record i can have muliple lines of "D" records, i.e detail records.
For each record beginning with "H" i
ONLY OUTPUT lines, beginning with D08 or D12 or D93
See example test lines below.
example of text file:-
H 20397337568237 company1
D90
D88
H 203866547658769 company 2
D01
D08
H 237693709283470 company3
D08
D01
There are 3 records in the above example. I do not want to output record 1,compnay 1 as it doesnt have a D08 or D12 or D93 beneath it.
I do want to output record 2,companY 2 because it has a D08 beneath it.
I do want to output record 3 , company 3, because it also has a D08 beneath it. However record 3 will not output for me when i use the code below, because D08 is not at the end of line?? Dont know why this is happening, Can anyone re-jig my if statement.
VB Code:
If useThisRecord Then '' now check through line by line to see if it contains a D93 record '' For j = 0 To UBound(strRecord) If (Left(strRecord(j), 3) = "D12") Or (Left(strRecord(j), 3) = "D08") Or Left(strRecord(j), 3) = "H20" Or (Left(strRecord(j), 3) = "D93" And Mid$(strRecord(j), 62, 1) = "S") Then useThisRecord = True Else useThisRecord = False End If ''if there is in fact a D93 record, then check if there's a P field If Left(strRecord(j), 3) = "D93" Then '' if there is a P at position 62 then this record is not okay '' useThisRecord = Not (Mid$(strRecord(j), 62, 1) = "P") End If Next End If
Outputting To Text Files
2 questions:
1) Does anyone know how to export a string to a text file without putting the quotation marks around it.
2) Anyway of stopping VB from zero suppressing integers eg stopping an input 0052 from being outputted as 52???
Replacing Text/Strings In A TextBox According To Txt File Lines
Hi,
Basically what I want to do is replace text, no whole text, but words or strings (i.e., more than one word) according to each line of a normal txt file.
So for example, if I had a file names converts.txt, and inside it had this:
Code:
test|example
post|thread
vb|vb6
etc etc, then what it means it, for the first line:
test = The word or string to be changed.
example = what that word or string is to be changed too.
There both separated by the line, |, in between them.
Basically, what I want this to mean it, when the use clicks a certain button on my for, the program reads this file, and on each line, the left side of the | is the word that it is looking for, and if found it will be replaced with the value on the right of the |. Thats what I'm really wanting to do, if you understand what I mean. Of course, if there is an easier way, I can do that, but I want the file to be editable to add more strings to it at any time and still function correctly. So could anyone help me with how to get the program to read each line, and if it finds any values on the left of the | on any line, it changes that value into the value on the right of the | for any all lines int eh file. Thus, each line acts as a different replacement. Sorry if I'm not making much sense, I don't know how better to explain it.
Any help would be much appreciated, and if you could do up a quick example, that would be great .
Cheers'
jarjar
Outputting Bold Text Using Windows API
Hi
I am using VB6 and am currently drawing some text onto a picture box using the TextOut() function, how do I change the font, font size and make it bold? I can change the colour using the SetTextColor() function, but haven't been able to find how to achieve the other formatting options.
Thanks in advance,
Mark
Freezing Richtextbox From Scrolling While Outputting Text
Hi all ... just wonder if there is any codes out there that can freeze the richtextbox from scrolling when outputting a long string of text.
My problem is when outputting a large amount of lines into a richtextbox, it tends to scroll along the last line of input. I want it to be fixed at the top of the richtextbox when outputting. Sometimes .. it remains at the top ... but sometimes .. it follows the last line ... this is weird ... probably due to the system graphic memory ...
Appreciate if anyone can tell me how to freeze the richtextbox when outputting.
Thanks !
Chris
Outputting Text From A Textbox To The Default Printer
I would have thought it might be easy to print out the contents of a textbox, and maybe it is, maybe I missed something, either way, how can I take the contents of a textbox in a form in excel and output that to the printer?
Thanks,
-Heathen
Outputting To A Txt File
Why Won't This Work? Any Suggestions...?
Code:
Open Trim(txtFileName.Text) & ".txt" For Binary Access Write As #1
Put #1, "BECK YOUTH INVENTORY", ""
Put #1, "", ""
Put #1, "Name", scores.lblName.Caption
Put #1, "Age", scores.lblDOB.Caption
Put #1, "Gender", scores.lblSex.Caption
Put #1, "Date", scores.lblDate.Caption
Put #1, " ", " "
Put #1, "BSCI-Y", scores.page1.Caption
Put #1, "BAI-Y", scores.page2.Caption
Put #1, "BDI-Y", scores.page3.Caption
Put #1, "BANI-Y", scores.page4.Caption
Put #1, "BDBI-Y", scores.page5.Caption
I get a Type Mismatch error when i run
BTW...The file needs to be created...(im not sure if i need to write code for this or if it's done automatically)
Thanks
Outputting To A File
Hi there,
The following code is getting stuck after the 'open' statement.
Error says the file is already open but it doesnt appear to be ...HELP
Thanks
Sub SQL_TBCRAUTH()
Dim outputFile As Long
outputFile = FreeFile
Open "C:SQL_TBCRAUTH.txt" For Output As #outputFile
Call insert
Close #outputFile
GoTo Done
Done:
End Sub
Outputting To A .bat File
Hi everyone,
How do I create a .bat file on "c:" of my local disk, then export the contents of a listbox to that .bat file?
Outputting A File
I was wondering how do you output a file to a specific folder/directory other then the one you are working out of, I.E. the directory "work" of MATLAB to import DATA
Parsing Long Text Strings Into Shorter Strings
Any help on the following would be greatly appreciated!
I need to split a long text string (variable in length) into shorter strings which are no more than 60 (or X) characters in length, but only breaking on full words (i.e. no hyphenation).
Example: The target string could be a full paragragh such as: "Customer called and wanted to know how to post invoices using a past invoice date, and yet age the invoices as of a future invoice date. I told her this would violate the integrity of her accounts receivable system, but would contact one of our systems analysts regarding a quote on the number of hours required. I informed her I would send out a software modification agreement to her within one (1) week.”
I need to break it into shorter strings (of X length, in this case 60) which I can use and insert into other text fields. The above paragraph would be parsed into separate strings as follows:
“Customer called and wanted to know how to post invoices ”
“using a past invoice date, and yet age the invoices as of a “
“future invoice date. I told her this would violate the “
“integrity of her accounts receivable system, but would “
“contact one of our systems analysts regarding a quote on “
“the number of hours required. I informed her I would send “
“out a software modification agreement to her within one (1) “
“week.”
Thanks for your help!
Outputting File W/ Font
I just started learning VB when i got bored with java's GUI and i made some really quick wordpad thing
is there any way to save the current font + size to the file without it being readable like all other note pads do
i know the common dialog's fontname and fontsize things so i can change the font but i dont know how i would save that info into the txt file
Outputting Objects To File
Hi everyone,
I'm working on a very simple drawing program, just using the line and shape objects, which I am creating in my code. I want to know how to store the information about these objects in a file so I can implement an open/save file option in my program.
Thanks in advance,
Bird_GT
Outputting My File Into A Letter
Hello everyone~
I am in the process of making a program that will input a list of manufacturers names and then output them to a letter that for each name. Any suggestions? Here's the code so far.
Private Sub cmdInputName_Click()
'Input Data from hardware.txt file
'//Define variables
Dim nom As String
Dim sBrands As String
Dim iCount As Integer
'//Initialize variables
Me!txtName.Text = ""
nom = ""
sBrands = ""
Open "a:hardware.txt" For Input As #1
For iCount = 1 To 7
Input #1, miNum(iCount)
sBrands = sBrands & miNum(iCount) & vbCrLf
Next iCount
Me!txtName.Text = sBrands
Close #1
End Sub
Private Sub cmdWrite_Click()
End Sub
Help With Reading An XML File And Outputting It To A Combo Box.
Hi, currently im designing a program that is going to edit an xml file that is going to remain constant (as in everybody has the same format who is using the program). This is an example of the code:
Code:
<?xml version="1.0" encoding="utf-8" ?>
- <accounts version="2">
- <account name="test" pass="dnsiy" plevel="2">
<created>5/20/2006 3:08:21 PM</created>
<lastlogin>6/1/2006 3:07:45 PM</lastlogin>
<gametime>00:43:41.1093750</gametime>
<guid>2261326</guid>
<guid>2261941</guid>
<ip>192.168.1.1</ip>
</account>
- <account name="changed" pass="oklol" plevel="0">
<created>6/9/2006 3:08:21 PM</created>
<lastlogin>6/18/2006 3:07:45 PM</lastlogin>
<gametime>00:43:41.1093750</gametime>
<guid>2342324</guid>
<guid>1331232</guid>
<ip>134.158.134.234</ip>
</account>
- <account name="z234" pass="gsdfgr" plevel="0">
<created>6/3/2006 3:08:21 PM</created>
<lastlogin>6/2/2006 3:07:45 PM</lastlogin>
<gametime>00:43:41.1093750</gametime>
<guid>2234436</guid>
<guid>2565234</guid>
<ip>123.145.134.122</ip>
</account>
</accounts>
What I'm trying to do is make a combo box that shows just the name of the account (which is <account name="blah") and when it's selected it will show all of the other attributes in textboxes, including the name. Right now I use:
Code:
Dim xmlNode As MSXML.IXMLDOMNode
Dim xmlDOM As MSXML.DOMDocument
Set xmlDOM = New MSXML.DOMDocument
xmlDOM.async = False
xmlDOM.Load ("i put the path in here")
cboItems.Clear
For Each xmlNode In xmlDOM.childNodes(1).childNodes
cboItems.AddItem xmlNode.Text
Next
When I use this is shows all of the things after the <account name="whatever" pass="whateva" plevel="0"> tag in the combo box all mashed together into one line.
If you know of any example code that can help or have any advice please let me know. I know how XML works but I am very confused on how it works with VB.
Reading Access DB Outputting File
Hey, this is a reoccurring problem that I have been unable to resolve. Originally I thought that it had to do with a string length. I recently have determined that really isnt the problem and am unable to figure out for the life of me why it isn't working. If anyone could take a look and suggest a fix, Id greatly appreciate it.
The file reads a Access Database and outputs to a text file different SQL commands. However, for some reason, it reaches a certain point and stops outputting that string. Use the modification **NUMTAG and select the out.txt
This is not my code, but someone elses in the company that has recently left, without fixing the code. The project with the trouble is exportmodification.vbp and the problem is occurring around lines 51-55.
|