Working With WAV Files In VB
I would like to know if anyone knows if it is possible to programmatically open a WAV file, record from the AUX sound source, and then detect when the sound source is silent and then close the WAV file.
Thanks, Mike
===== Do not make the mistake of judging another's religion by your own standards of knowledge and truth. The Urantia Book, Page 1115
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Wave Files And Vista. Some Working And Some Not Working. Strange.
Hello everybody,
I have an application with embedded in the ressource file wave files. I use PlaySound to play them. This works perfectly up to Windows Xp.
Recently I have a friend testing the application on Vista. Certain files are not playing, and others are.
Any ideas why some would play and some wouldn't? It seems very strange.
Here is the code. It works for some wave files and not others
VB Code:
Call PlaySound("MY_EMBEDDED_WAVE_FILE", App.hInstance, SND_RESOURCE Or SND_NOWAIT Or SND_NODEFAULT Or SND_ASYNC)
Help Files Not Working
After installing Visual basic 6.0 professional I try to got to help throught the main screen "help" then index, search ... but an error message appears:
"The MSDN collection does not exist. Please reinstall MSDN"
I have reinstalled all of visual basic but the same thing comes up
Can anyone help with getting the files or any alternatives because i'm incredebly new to VB and have no idea how to do the simplest things
thanks alot
Working With XML Files
Prior to sending my actual question is there any way to attach XML and XLS files with my thread. It would be alot easier to illustrate my problem if you could see the actual files.
Working With Files
Good Morning all, if ur in england!
im just wondrin if there is any way in which you can associate files to a program. e.g. When you create a new Microsoft Word document, it says
MyDocument.doc
Microsoft Word Document
is there any way of doing this with my own app?
cheers
Working With Files
Hey Guys , all right?
At this moment a need to creat a vb aplication, how i can select files, rename and copy in a specific directory. I didnt know function and sintaxex for do it. please help me about it
Thanks a lot,
Amauri Pimenta Junior
Working With INI Files
Does VB6 have any simple way for writing and reading application settings to and from INI files?
(I see no reason to constantly access the registry, and INI files are quicker to edit manually.)
Working With Files
Hi!
Code:
Dim FilePath as String
FilePath = "TheFile.dat"
Open FilePath For Input As #1
Input #1, ECG.Data 'it's a string
that's the code of storing string data in to a variable,
but the file is too big to be put in a string variable, so I want to do this:
Code:
ECG.Data = mid(Input (#1),start,100)'i know this is not going to work
how do i do that
Working With Files
I am working at an application where i build a function tha do that.
open a file and read each line until EOF.
My problem is that when in the file it is "," character VB6 knows that there it is the end of line but it is not.
The code is next:
open x.txt for input as #1
while not eof(1)
line input #1,ch
wend
close #1
Working With Three Different Files Using VB 6
new to VB, and need to create a file that can be updated by using transaction and update files. what codes should be used to incorporate following three conditions: addition, correction, and deletion.
Working With Files
Hi all,
I want to open a text file for reading some characters.
What is the simpliest way to achieve this in VB6 ?
thx.
Working With Pst Files
um .. just want to know how i can do some things with pst files
1. create a new pst file
2. create a folder in the new pst file
3. copy objects between the existing and the new pst
4. get the file name of a store from the store id
thanks in advance
Kris Bennett
Working With Txt Files
Hey everyone got a question for ya I am wanting to be able to hit a button and have it go through about 70 txt files and copy and paste the information in those text files and put into 1 text file with a space or so gap between is this a easy task and what do I need to do to get started? Thanks
Robb
Working With Txt Files
Hey everyone got a question for ya I am wanting to be able to hit a button and have it go through about 70 txt files and copy and paste the information in those text files and put into 1 text file with a space or so gap between is this a easy task and what do I need to do to get started? Thanks
Robb
Working With MP3 Files
How can I edit ID3 V2 information of MP3 files?
With your tip "Working With MP3 files" the class
file edits only ID3 V1.0 data, but also the comment
field of ID3 V2. Still it doesn't make changes to
other ID3 V2 fields. How can I decide which ID3
version fields to replace?
And what about tracknumbers?
Thanks.
Working With Files
Hi Guys! I was wondering if anyone could point me to a tutorial or some way to find out how to work with files/directories. I need to 1. Check if a directory exists 2. see if there are files inside 3. count the files 4. grab the newest one and disply it (photo) and 5. move the files (cut) to another folder when done
Probobly easy stuff but i just need a hand getting started. Any takers?
Thanks in advance!!
Working With Files
Hiya World,
Anybody know any links to info on using VB with files such as .CSV or .XLS.
Cheers,
Monkey
----x----
Working With Txt Files.
Before I explain my problem, this is a sample of the text file I need to get the information out of.
[
111301,061259,www.vbworld.com,http,123.45.43,8080
102302,120012,www.vbforums.com,http,123.45.43,8080
]
This would basically go on for about 200 lines in the text file, each bit of information being separated by a comma.
I need to take the first bit of information, 111301, and put that into a(1), where a is a string array. Then I need 061259 in b(1), and www.vbworld.com in c(1), etc...and the next line of information going into a(2), b(2), c(2), etc...
Does anybody know a good idea on how this can be accomplished? If i'm not clear enough, just leave a message and I'll try to clarify.
Thanks.
Working With Files! : )
Well, I've always opened files for Output, Append, or Input which I'm pretty sure by now means I'm working with ASCII only because I'm trying to write WAV files (as well as jpgs, gifs, and other binary types) and what I know right now doesn't cut it.
But what I'm really trying to accomplish is something similar to the .pak file type (used in Half-Life, Quake 2, etc). Since a LONG time ago, nobody answered me about using .pak files, I'm now trying to make my own way to write and easily retrieve files from a "pak" file that has many files (ASCII and Binary).
Ummm... so, ya... help?
Working Wth Files
Alright I made myself an mp3 player runs a lot faster then media player cause it has so much less options takes up a ton less space and let alone i like it better. Just one problem. If you have mp3s on your comp and you double click on them it starts up media player or winamp. Well if media player or winamp is running it and you double click on it it will not open up a new winamp or media player but instead the old existing one will start to play the new song. How in the world can this be done? I am getting my project to open the mp3 on load like this:
Code:
Private Sub Form_Load()
Me.Show
Label1.Caption = Command
If Label1.Caption <> "" Then
mp1.Open Label1.Caption
Dim strFile As String
strFile = Command
Label4.Caption = Mid(strFile, InStrRev(strFile, "") + 1)
Label4.Caption = Left(Label4.Caption, Len(Label4.Caption) - 4)
End If
mode = GetSetting("KOM", "MP3 Player Single", "mode", Default)
If mode = 0 Then
Label3.Caption = ""
ElseIf mode = 1 Then
Label3.Caption = "Repeat"
End If
End Sub
Some of that coding is not nessary for you to see but I figured I would show you the whole form load. Is there a special command for this or I have no idea. I will stop rambling on. Sorry. Thanks!!
VB And Working With Files
I'm just learning VB, I use it a little in excel and with a compiler. I still haven't learned how to move, copy, delete, or get the name of files. A little help working with files would be great.
Thanks,
Shai1
Working With Files
How can i create a VB application that will open a text file to an excel worksheet.
tanx in advance...
Working With Files !!!
Hello everyone !
Im tryin to use a formula wich is loaded from a simple file to a Label named "formula".
Formula type is like : (2 * x) + (2 * y).
In the same form i have puted 2 text boxes. One named x and the other named y. When i press the button Calculate i want to have the result using this formula.
Private Sub Calculate_Click()
result = formula
End Sub
rsult is a Label too.
The result gives me only the formula in string format the way it is without making the calculations.
Can anybody help me on this ???
Working With Files.
Can someone please help me.
I made the mistake of mentioning to my boss that i am learning to program with VB6, so he thought it would be a good idea to give me a project.
I have a file which i beleive to be a Random access file.
The file looks lke this when opened in note pad.
"ABRAHAMS MR. HIGHFIELD, 67 "
"ADAMS MR.R. BALLYHOLME 407 "
"AITKEN MR. SHERNFOLD MEADOW COT 347 "
"AKHMEDOV MR. SOMERTON HOUSE, 77 "
"AL MULLA MRS. 3,THE BYEWAY 404 "
"ALEXANDER MRS. FOX END 330 "
"ALLARD MR. 43,MOUNT PARK ROAD 278 "
"ALLEN MR. S. BEACON HOUSE 299 "
"ALLEN MR.B. WARLEYS 21 "
He wants me to write a program in which the user enters a customer name in a txtbox and presses search, the program then goes through the file until it finds the customer name and the reads the data within that record and takes the address details and displays it in a list box.
I have written some code that displays the whole record when the user enters the customer name. but thats as far as I have got. I just cant work out how to retreive the parts of the record i need.
this is what i have so far
Code:Private Sub CmdSearch_Click()
LstResult.Clear
Dim Lines As String
Open "D:VB6ProgrammingData FilesCUSTOMER.Dat" For Input As #1
Do While Not EOF(1)
Line Input #1, Lines
If InStr(1, Lines, TxtSearch.Text) Then
LstResult.AddItem Lines
End If
Loop
Close #1
If Lines <> "" Then
LstResult.Text = Lines
Else
MsgBox "Nothing Found"
End If
End Sub
Is this at all possible
I need help.
Many Thanks in advance
<Edit> AbbydonKrafts - Added PRE tags around the data to prevent space collapsing </Edit>
Edited by - AbbydonKrafts on 2/22/2007 5:14:59 PM
Working With Files.
Can someone please help me.
I made the mistake of mentioning to my boss that i am learning to program with VB6, so he thought it would be a good idea to give me a project.
I have a file which i beleive to be a Random access file. which i have attached.
He wants me to write a program in which the user enters a customer name in a txtbox and presses search, the program then goes through the file until it finds the customer name and the reads the data within that record and takes the address details and displays it in a list box.
I have written some code that displays the whole record when the user enters the customer name. but thats as far as I have got. I just cant work out how to retreive the parts of the record i need.
this is what i have so far
Code:Private Sub CmdSearch_Click()
LstResult.Clear
Dim Lines As String
Open "D:VB6ProgrammingData FilesCUSTOMER.Dat" For Input As #1
Do While Not EOF(1)
Line Input #1, Lines
If InStr(1, Lines, TxtSearch.Text) Then
LstResult.AddItem Lines
End If
Loop
Close #1
If Lines <> "" Then
LstResult.Text = Lines
Else
MsgBox "Nothing Found"
End If
End Sub
I need help
Please do not double post, check the posting guidelines.
I am looking this thread, a similar post can be found by clicking here
Edited by - rock on 2/21/2007 2:12:30 PM
INI FILES NOT WORKING
Can someone please help me with this project. i am trying to make the setup record in my ini file. but it is not seeming to work. the ini code is in the frm2 ok button.
Working With .Wav Files
I have used playsound command to play a series of wave files.But often the wave(.wav) files get corrupted.I have tried making it read only and still has the same problem.I have not used any api calls.Any ideas?
Code ..Debug ..Go Home
Working With Files
Hi,
Im new to evb and i havent seen in the forum anything about replacing string in a file. I am writing to a file with lineprint command but i would like to open the file and replace a string at a specific line. My ideas was to delete the line fisrt and rewrite the reolaced one, since the order was not important. So, can anyone tell me how to delete a line from a file, or if there is a better way to replace a string on a file.
THKZ
GAFS
Working With Csv Files
I'm sure this is an easy for most of you.
I have a csv I've downloaded that has "Stock,Date,Time,Price"
as a header. Following that is the data associated with the header in chronological order. (The first line is the header followed by the EARLIEST data which continues downward to the MOST RECENT data at the EOF).
I want to display the info such that the headers are in text1 followed by the Last line(most recent data) in text2...etc.
Thanks for any help
Tom
Working With Text Files
Hi,
How can I check if a text file I need (as a config file to my application) is empty?
THX
Tzachi
Working With Binary Files
How do I access a file in hex.. for example a bitmap file or any other non-text files.
if I open a file in binary as #1
Open "data.bmp" For Binary As #1
how can I go to location 1ef23 (hex) and retrive a byte and put it into a integer variable say Readbyte?
Normally I would use fseek() in C, but it seems that in VB I have to keep reading the file until location 1ef23.
For example: Buffer = InputB(126755, #1)
then: Readbyte = InputB(1, #1)
which gives me a type mismatch
Say the data at location 1ef23 is 64(hex), how can I make Readbyte to contain 100(integer) ?
Working With Text Files
Hi,
I have written some code that takes information from a form and places it into a text file, the code looks something like this:
open filename for Append as #1
Write #1 String1, String2, String3, CurrentTime
Close #1
This gives me a text file that looks something like this:
"102", "1123", "1.2", "34", "06:16"
"304", "1204", "1.6", "38", "06:34"
"406", "1034", "1.1", "56", "06:57"
As you can see this has a time on it so this is my 'current' file. When the job is finished I am able to extract the information I want. For example if this was the line starting with 304 I can take all the information I need and then work out the rate with the current time against the time saved in the file. Using the same method as above I put all this into a 'complete' file. What I would like to do is to remove this line completly from the current file although I cannot find out how to do it.
Any help would be much appreciated.
Also does anyone know how I would go about sorting a text file numerically?
Thanks
Craig
Working With Delimited Files
This may be dificult but here goes. I have a delimited file that I need to read/open in a RichTextBox that I have on a program, it looks like Windows Notepad. Once the file is opened in the program it needs to filter out what I don't want and just focus on what I do want. In the program it will calculate the number of occurances of a number that's in the file. An example of the first 5 lines of my data file is below.
all I need it to focus on is the set of numbers grouped like 5,11,29,47,50 and 17 from the first line in the file. The rest I don't want it to count/calculate or pay attention to.
9-6-1996; : 5,11,29,47,50; Money Ball: 17
9-13-1996; 3,4,9,30,47; Money Ball: 1
9-20-1996; 5,24,31,34,48; Money Ball: 6
9-27-1996; 8,25,35,37,48; Money Ball: 8
10-4-1996; 8,16,18,36,38; Money Ball: 1
10-11-1996; 2,23,37,40,50; Money Ball: 22
Anyone know where I can start with this? i'm running vb.net 2005 express by the way.
Thanks in advance to anyone that can help me.
Direct3D .x Files Not Working.
Hi, i've began writing a trading game set in space. I have got a class working where 2D sprites/graphics are not a problem. Ive decided that it would be better to use .x files so that the planets rotating wont need huge animation sheets.
I have 3D studio 3.1 and i have exported the model with the texture and tried putting my .x file into a tutorial about .x files. The original loads no problem, but my .x file only shows a white silouette of the sphere.
I used a plugin for 3D studio to export the file, maybe i need the .x converter with DX SDK. if anyone has it or any ideas what could be causing the problem?
Cheers
Working With Text Files
Well i am working in txt files..
when i open the program it opens the file .. and when i search in the file for specific line.. its ok for the first time..
while searching next time it gives me error End of File
how to move pointer to Begin of file without closing and opening it again...
Thanks
Working With Ascii Files Help
I have two very large flat ascii files.... what I am trying to accomplish is this
my main file contains something like this as an example
124356 Process Notes
645281 Process2 Notes
......
My second file contians this as an example
645281 905
666666 980
There are thousands of the above examples in my files.
Here is what I want to do. I want to look at the first line in the second file and search the first file for any and all occurances of the first six characters (645281) if I find a match I want to replace 645281 in the first file with 645281 905 from the second file . If no match is found then do nothing. Now move to the next line in the second file and do the same thing.
I have started using rich text boxes to work with the files but I am not having much luck with it.
Any help at all would be greatly appreciated,
Thanks in advance
ZOLDY
Working With Text Files
basically I need to search thru multiple text files and display the all the files that the name appeared in...
for example... if I was to search for "Brian Dooley" I'd want it to look into the text files and display in another part of the program all the txt files(not full paths just file name) that that "Brian Dooley" appeared in..
the text files would be formated simular to below..... if anyone can help get me started in the right direction... I'd be very grateful
file1.txt
1,Brian Dooley
2,Rabbit
8,Joy Roy
file2.txt
1,Run
3,Jump
5,Brian Dooley
Working With WMA Music Files.
Anyone know where I can learn to manipule WMA files... namely get info from this type of audio file...
most importantly what I"m looking for is say 1.wma play time is 3:00 and 2.wma play time is 3:00. I'm looking for a place that I can learn to exctract that info from a WMA file and add the 2 times to geather to get 6:00
I hope I explained that right.
Working With Batch Files And BCP
Hello,
I have a check box set up on a form called 'cbReset'. When the user clicks this box, they are basically warned that their MSDE databases will be dropped and recreated.
Currently, I am using 'Shell' to execute batch files that drop/create the databases. These batch files also implement Bulk Copy to put the data in the databases.
The following is a sample of one of the batch files;
*******************************
set txtpath="C:Documents and SettingsAll UsersApplication DataAIG Datadatasbnad201
set scriptpath="C:Documents and SettingsAll UsersApplication DataAIG Datascriptssbnad201
set sqlserv="localhostPOSDBTRN"
osql -n -E -i %scriptpath%Create_sbnad201.sql" -S %sqlserv% -o %scriptpath%Create_sbnad201out.txt"
bcp "sbnad201.dbo.sbnat001_benf" in %txtpath%sbnat001_benf.txt" -c -T -S %sqlserv%
bcp "sbnad201.dbo.sbnat002_indv" in %txtpath%sbnat002_indv.txt" -c -T -S %sqlserv%
bcp "sbnad201.dbo.sbnat003_org" in %txtpath%sbnat003_org.txt" -c -T -S %sqlserv%
*************************************
There are four of these batch files. The vb6 code that executes the batch files looks like this;
************************************
Private Sub cbReset_Click()
Dim bResetValue As Boolean
Dim iResponse As Integer
Dim bFileExists As Boolean
bResetValue = (cbReset.Value = vbChecked)
If bResetValue = True Then
iResponse = MsgBox("This will revert training mode to the original state. You will lose changes made in previous training sessions.", vbExclamation + MB_OKCANCEL, "Training Reset")
If iResponse = 1 Then
msShellCreate = "C:Documents and SettingsAll UsersApplication DataAIG Datascriptssbnad201cpSBNAD201in.bat"
Shell msShellCreate, vbNormalFocus
'Shell
msShellCreate = ""
Else
cbReset.Value = vbUnchecked
End If
'If out file exists....
If iResponse = 1 Then
msShellCreate = "C:Documents and SettingsAll UsersApplication DataAIG Datascriptssinsd201cpSINSD201in.bat"
Shell msShellCreate, vbNormalFocus
msShellCreate = ""
Else
cbReset.Value = vbUnchecked
End If
If iResponse = 1 Then
msShellCreate = "C:Documents and SettingsAll UsersApplication DataAIG Datascriptssnbad201cpSNBAD201in.bat"
Shell msShellCreate, vbNormalFocus
msShellCreate = ""
Else
cbReset.Value = vbUnchecked
End If
If iResponse = 1 Then
'When cbTraining = True, the application is connected to this database, and so the database cannot be dropped.
msShellCreate = "C:Documents and SettingsAll UsersApplication DataAIG Datascriptssposd201cpSPOSD201in.bat"
Shell msShellCreate, vbNormalFocus
msShellCreate = ""
Else
cbReset.Value = vbUnchecked
End If
End If
End Sub
*************************************
(Currently, the last batch file cannot be run because the application is connected to the database that the batch file addresses). If it were not for a time constraint, I'd get up to speed on SQLDMO and go that route. Anyway, one thing I would like to do is have each batch file run, and check to see whether or not it was successful. If it was, then run the next batch file. I thought I might be able to use a switch in OSQL to create a log file that I could check at the end of each batch file, but I guess not.
If you have some ideas on this, please let me know.
Thank you for your help!
CSDunn
Working With DBase IV Files
I need a source for working with DBase IV files (read/write) in pure VB and independent from ADO and other data controls.
Please help with a link or an attachment.
Working With Text Files
Hello,
First of all let me say sorry for asking such a lot here. Basically my VB skills are very rusty as I haven't had to touch it for a year or two. Now that I am getting back into it I am finding it a little difficult.
In the source code provided, I was wondering if someone could help me add a few features I have been trying to get right. I am not asking you complete the program to the ground (well I guess pretty close), but to get the major parts done. You don't really have to code it in, just point me in the right direction.
Here's what I want:
cmdSearch:
Search the text file until it finds a line with jobnum.text in it. If it does, load the line into an array, and put [0] (job number?) into job jumber text (or leave it here from search). [1] into lblposessor. [2] into lbllastupdated. [3] lblcomments.
cmdUpdate:
Search the text file until it finds a line with newjobnumber.text in it. Once it does, write job number, currently in posession of and comments IN THE SAME FORMAT that could be read from the 'search' button.
If it cannot find a line with newjobnumber.text in it, it creates a new line.
------
Can anyone help me out?
Thanks guys, I know this might be a pain. Perhaps I will get back into VB
Accessing And Working On .c, .h Files From VB
Hi all,
I need to find few strings in .c/.h files which are part of a VC++ workspace and replace those strings with my new strings. I've stored the "strings to be found in the files" in one column and "strings to be replaces in the files" in 2 adjacent columns in excel worksheet. Can anyone help me how to proceed with this.
- Kavitha
Working With Tab-delimited Txt Files
Hello again, im trying to import an tab-delimited text file and id like to know on how to open it using vb 6? heres the scenario.. Once ive imported the txt file(tab-delimited), i will now generate a report using data report to display the results in the tab-delimited txt. thanks in advance!
Working With Flat Files
Hi
The MDB file for my app might or might not be in the same directory as my app. Before I open it, I would like to see if the files exists. If it does, then all is well. But if not, I would like to launch something that allows the user to navigate the files structure to find it, and return me the location. I would write this location into a flat file. I would then, and in the future, open this file, which would be in my location, and so I could open it without further navigation by the user. I'm sure it can be done. I don't know, but may be you do.
Thanks
Robert
Working With Text Files
Yeah, Yeah.. I know. But it's my only option at this point...
Anyway. I am creating a text file using print # statements in vb6.0
My question is.. is there anyway to format the file page properities (i.e., margin size, orientation) in code??
Please Help!! Working With Excel Files Using Vb6
hi,
i'm facing an error while trying to edit the contents of an excel file. i have used the same code previously and succesfully run the code...
VB Code:
With myExcelFile .Workbooks.Open FileName:=App.Path & "excel filesCARR.xls" .Worksheets("Sheet1").Select .Cells(1, 7).value = Left(Trim$(rs!CAR_ID), 4) & "-" & Mid(Trim$(rs!CAR_ID), 5, 2) & "-" & Right(Trim$(rs!CAR_ID), 3) .Cells(6, 2).value = Trim(rs!customer) .Cells(8, 2).value = Trim(rs!Job_No) .Cells(10, 1).value = Trim(rs!process) On Error GoTo printerr CommonDialog1.ShowPrinter .ActiveWorkbook.PrintOut , , CommonDialog1.Copies, , CommonDialog1.PrinterDefault '.ActiveWorkbook.PrintOut , , 1, , "\QAEPSON AL-C1900 Advanced" .Workbooks(1).Close savechanges:=False .Quit Set myExcelFile = Nothing End With
this works absolutely fine. now i'm trying to do the same thing and edit a file which i'm displaying using the OLE container control ...
VB Code:
With myExcelFile row = 4 Set rsQP = objQP.getQPtable("SC1403") Do While Not rsQP.EOF If Trim$(rsQP!Part_Proc_No) <> "0" Then .Cells(row, 1).value = Trim$(rsQP!Part_Proc_No) If Trim$(rsQP!Proc_Name) <> "0" Then .Cells(row, 2).value = Trim$(rsQP!Proc_Name) If Trim$(rsQP!tools) <> "0" Then .Cells(row, 3).value = Trim$(rsQP!tools) If Trim$(rsQP!Char_No) <> "0" Then .Cells(row, 5).value = Trim$(rsQP!Char_No) If Trim$(rsQP!Char_Prod) <> "0" Then .Cells(row, 6).value = Trim$(rsQP!Char_Prod) If Trim$(rsQP!Char_Proc) <> "0" Then .Cells(row, 7).value = Trim$(rsQP!Char_Proc) If Trim$(rsQP!Special_Char_Class) <> "0" Then .Cells(row, 8).value = Trim$(rsQP!Special_Char_Class) If Trim$(rsQP!Methods_Spec_Tolerance) <> "0" Then .Cells(row, 9).value = Trim$(rsQP!Methods_Spec_Tolerance) If Trim$(rsQP!Methods_Eval) <> "0" Then .Cells(row, 10).value = Trim$(rsQP!Methods_Eval) If Trim$(rsQP!Methods_Sample_Size) <> "0" Then .Cells(row, 11).value = Trim$(rsQP!Methods_Sample_Size) If Trim$(rsQP!Methods_Sample_Freq) <> "0" Then .Cells(row, 12).value = Trim$(rsQP!Methods_Sample_Freq) If Trim$(rsQP!Methods_Control_Method) <> "0" Then .Cells(row, 13).value = Trim$(rsQP!Methods_Control_Method) If Trim$(rsQP!resp) <> "0" Then .Cells(row, 14).value = Trim$(rsQP!resp) If Trim$(rsQP!Reaction_Plan) <> "0" Then .Cells(row, 15).value = Trim$(rsQP!Reaction_Plan) row = row + 1 rsQP.MoveNext Loop End With
this code gives me an error "Run-time error '1004': Method 'Cells' of object '_Application' failed". It indicates that ".Cells(row, 1).value = Trim$(rsQP!Part_Proc_No)" has the error. I have no clue why?! Any help is most appreciated!!
Thanks a lot!
gupt
Working With Text Files
Well i am working in txt files..
when i open the program it opens the file .. and when i search in the file for specific line.. its ok for the first time..
while searching next time it gives me error End of File
how to move pointer to Begin of file without closing and opening it again...
Thanks
Code For Working With .ico Files?
This may be a toughy, but here goes.
Does anyone know how to read an .ico file and (1) identify the types of images it contains (i.e. "32X32 256 color", "16X16 256 color", "48X48 etc.") and (2) save off to a new file a file with only the image sizes I want (i.e. just 32x32, or just 32x32 and 16x16, etc.).
Now - really pushing it - does anyone know how to create a "gray-scale" image, given a color image (i.e. read in a normal color-icon, apply gray scale to it, and output the gray scale "disabled-looking" image)?
Any help would be appreciated.
Working With Files && Strings
Ok, please read careful and ill explain as best i can. Im making a simple little URL Organizer. Ive recently learnt (thanks to someone else) how to write, close and delete files. Now when i add a link to the organizer and close the app any links populated in the list box are saved to a text file, so when the app is re-opened the list box is re-populated, if you get me. Anyway when i add a link to the organizer you can add a description, so then if a list item is selected when you press the description command button the appropriate info is show. Everything here is working fine. The problem however is when i close the app and then re-open it, my stored links are there, but no description to go with it. But remember, i just added a description, so it was lost when the app is closed. How do i store the description for the Link item when the app is close? So when the app is loaded the links are all there with their correct descriptions. If you know what i mean. Sorry if this is a bit confusing, cos im also confused.
THANKS VERY MUCH
|