|
Hi Thanks for your reply. I am using VB 6 which I forgot to mention. Do you know the code for VB 6.
Thanks
|
|
|
|
|
Dim mDab as new filesystemobject
dim mtxt as textstream
dim mFile as file
dim i as integer
call mDab.createtextfile("c:\list.txt")
set mfile = mDab.getfile("c:\list.txt")
set mtxt = mfile.opentextstream(forwriting)
for i = o to listbox1.items.count-1
call mDab.writeline(listbox1.item(i))
next
call mtxtstream.close 'put this line in the private sub Form_Terminate() ok
it will solve ur problem
:->
Thanks alot
Hamody
|
|
|
|
|
How can I change an Excel worksheet column's format in vb6.
I can open an Excel app and write to it, but if I write text like "00100" it loses the 0's and becomes "100" because the column format is General. How can I change it to Text in code?
1fm1fu
|
|
|
|
|
The quick way to do it is to use "'00100" or write a quick function to append the ' to the front of the value.
Or set the numberformat property for the range then the value as below:
Dim c As Range
Set c = Worksheets("Sheet1").Range("A1")
c.NumberFormat = "@"
c.Value = "00100"
|
|
|
|
|
Thanx jonathan15, this works.
I'll try hard and convince Christine, my code tester, not to worry about the mark this makes in the cell.
1fm1fu
|
|
|
|
|
If you use the second method the only mark it will leave will be a green tab in the top left corner of the cell which is simply there to show that it is a number formatted as text. This would be there even if you used the Excel menu to format the cell.
Jonathan
|
|
|
|
|
hi all, could anyone give me a code of zipping a folder like we zip it manually using winzip program
Thanks alot
Hamody
|
|
|
|
|
take a look at Component spot. They have a pretty good one with some examples...and its free!
|
|
|
|
|
hi man, thanks alot for ur help but the site u sent me doesnt open so could u please check it, thanks again
Thanks alot
Hamody
|
|
|
|
|
It's http://www.componentspot.com[^]. All you had to do was search for "Component spot" on Yahoo or Google to find the correct URL.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi man the site u sent me gives a trial versions of a programs but i need a code to add in my project so could u plz plz plz plz help me in getting this code
Thanks alot
Hamody
|
|
|
|
|
I don't know who the Anonymous poster is, it wasn't me. All I did was supply a fixed link.
You might want to try #ZipLib[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
ok man i tried it, but now am looking for a code that zip a folder not just a file as a site code gives, and i would like to ask u for another help if u can which is how i can save email message as msg file format i need a code man so could u plz plz help me
Thanks alot
Hamody
|
|
|
|
|
Don't know. I've nver had to use any .ZIP library in any of my code.
Mohammad Bassam Daba`an wrote:
how i can save email message as msg file format i need a code man so could u plz plz help me
Can't help there. I don't know the Outlook object model well enough.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi i want to ask u for another thing also plz...
i want to insert any file format into a rtf do u know the cade of this important thing.
Thanks alot
Hamody
|
|
|
|
|
Don't know that one either. But it's been asked on the Forums before an, IIRC, it's not easy. There are no .NET Framework methods that expose this functionality so you'll have to call into the control directly and into the Win32 API to get this to work. You might want to try reading Use IRichEditOle from C#[^] by John Fisher first before you decide to tackle this project.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
ok man but i tried it before it is not enough, thanks alot for trying helping me but am searching on this point since 2 months so i gonna be crazy from this point i dont know how i can get the solution
Thanks alot
Hamody
|
|
|
|
|
hi, could u plz help me in another problem
i want to make the treeview to be right to left, i use vb6.0
i neeeeeeeeed help
Thanks alot
Hamody
|
|
|
|
|
hi could anyone give me a code of saving the email message as MSG file format i need a code plz any help
Thanks alot
Hamody
|
|
|
|
|
Here is a VC++ dll which should pass several results.
How to define the parameter?
Just like Windows API?
|
|
|
|
|
What C++ .DLL? What function call are you talking about? What parameter?
This process process is no different than calling a Win32 API function, which are just other C++ .DLL's.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have solved the problem.
Thanks.
|
|
|
|
|
In VB.NET
2 part question:
I want a DataRow that contains a column with a specified value.
Part 1: would the following work to identify the row that contains the value and assign it to the DataRow?:
drPart = DsParts1.Tables("EventID").Rows.Find(iEventId)
‘where EventID is the column and iEventId is the value.
Part 2: Once I have identified the row with the value and assigned it to drPart, how do I assign the index of that row in the table to iIndex variable?
Thanks.
|
|
|
|
|
1. Will work only if the value you are searching for is in your PrimaryKey column. If not use the DataTable.Select function. You can even use complex queries there.
2. I think there is no elegant way to get the index. If your really need it you will have to determine it yourself:
public int IndexOf(DataRow row, DataTable table) {
for (int i = 0; i < table.Rows.Count; i++)
if (table.Rows[i] == row)
return i;
return -1;
}
Note that this is not very effective and should not be used with large DataTables.
|
|
|
|
|
Thank you, Robert.
I have been working on it and between two VB.NET books I was able to figure out how to use select method to form a subset. You are right about using select, it was much simpler than what I had originally thought to do. I was going to use the index (if it existed) and move through the data table to find the rows I wanted.
|
|
|
|