|
I checked this option, but it seems that I can't use SaveAs function for OLEObject. Can you write me the code lines of how to save OLEObject (that contains one item - which is text file) to text file? Thanks
|
|
|
|
|
I think I misunderstood you before. Your saying that you imported the text file and kept it an OBJECT in the worksheet? You did NOT import the text into the worksheet?
If that's the case, could you import the text as text, not an object, onto a newly created blank worksheet, then use SaveAs on the worksheet object?
RageInTheMachine9532
|
|
|
|
|
I imported the data as an object, since the data file has more lines than the sheet. Hence, importing the data into blank sheet will not be good.
|
|
|
|
|
OK. Now I'm a little confused...
Are you saying that the text your importing is NOT integrated into the worksheet data? Or are you scanning the data yourself and importing sections of it?
Now, are you putting the modified worksheet data back into the text file?
Or are you putting the original text file back on the clipboard from Excel and treating the text file something like an email attachment?
RageInTheMachine9532
|
|
|
|
|
I have a big text file (standalone). I want to analyze the data in it.
In order to analyze it, I need MS Excel. I wrote a macro that reads the data from the text file into array, analyze the data and at the end import the text file as an OLE Object (from Menu bar I Choose Insert, then Object and then the file name). I can't paste the text file to sheet, since the number of lines is text file is bigger than the max number of lines in Excel sheet. Then I save the Excel file. I have a sheet that contains an object in it.
I send this Excel file. Now, I assume that I get the Excel file.
I open the saved file. I want to analyze only part part of the data.
I need to read the text file into the array. The text file is located in the sheet, and I don'd know how to read data from it. If I will copy this text file outside of the Excel, I will know how to read it.
I need the code to copy this textfile outside of the excel. (I succedded to copy the text file to the clipboard, but not from the clipboard to the desired directory. Thanks
|
|
|
|
|
Well, I've found out the you can't programatically get to what you want to do. In order to save the object back to a text file, you have to righ click the object icon, select Package Object, then Edit Package. A new window will open up called "Object Packager". From here you can select File|Save Contents to resave the text file back to an actual file. The problem is, you can't programatically control the Object Packager.
I think you'd be better off importing the text into a second worksheet in the same workbook, but you'd have to do the importing yourself, one row for each line of the file and when you run out of rows, go to the next column and go down the rows again, and repeats this until you run out of text file. Then, you can write another macro to do the same thing, but write out the text instead of reading it.
But, the bottom line seems to be keep the files seperate and have Excel import the data you need when you need it.
RageInTheMachine9532
|
|
|
|
|
|
hello
can anyone help me?
i wish to build a form where the user will type in a book name
then when user press the button, there will be a image of the book on the pictureframe
how to set the form to get the picture that i wanted from a folder?
can any please help me?
your help is much appeciated
thank you
|
|
|
|
|
you can set the 'picture' property of a picturebox object on your form to any image that you want, ex: myPictureBox.picture="myPhoto.jpg"
if you want to get the image from a subfolder in the applications' folder, use something like: myPictureBox.picture="\images\The Book of Stuff\cover.jpg" or
myPictureBox.picture=CurDir() & "images\The Book of Stuff\cover.jpg"
this is probably very obvious and probably u've already tried this method.
if this doesnt help, supply more detail, id like to help.
------------------------
Jordan.
III
|
|
|
|
|
sorry for the late reply
thank u for your help by the way im using vb6
yes i have try those
is working perfectly
my lecturer want me to do a book searching
example
VB 6.0 will show the book picture
VB.net will show other picture
to do this i have set the picture name in the database
but she says that this is a noob way to set it
my db is like this
book=vb.net pic=vbnet.jpg
she want me to delete the pic column in the db
that means all i can do is
try to tell the program to get the picture once i enter the name(VB.net)
n the picture will show up without refering to db(pic column)
is this way possible?
thank you for your help Jordan
|
|
|
|
|
sorry, i dont understand that.
how about u paste some of your code or email me your project .zip'ed if its too long to paste.
nadroj_@hotmail.com
------------------------
Jordan.
III
|
|
|
|
|
Hi,
Regarding the Data binding, How can i communicate to use the data binding with User Control in VB.Net.
If I have a User Control that I want to make it ready for data binding, means if i put a texbox in the form, I can bind the textbox to the usercontrol's property. Is that this possible get it.
Hope that you all can give me some example to do that.Please help me.
Thanks & Regards.
|
|
|
|
|
You can bind your UserControl to the Textbox's Text property (or any other properties).
Here's an example:
UserControl1.DataBindings.Add(New Binding("UserControlProperty", TextBox1, "Text"))
Check MSDN on Data Bindings[^] for more information.
Edbert P.
Sydney, Australia.
|
|
|
|
|
I have developed a program that I need to convert to run under windows XP but I can not find out how to autorun a program under xp for a limited user neither, the all users startup directory option or the run registry keys seem to work.
Any help would be gratfully appreciated
|
|
|
|
|
Well, those are the options you have. If the user is a member of the local Users group, running from StartUp or the registry is not a problem.
What is so limited about this user? Do you get any error messages when you try to run the program from the Startup or Registry? Are you having installation problems with error messages?
RageInTheMachine9532
|
|
|
|
|
Hi
I want to write a program that user should enter the time
and they don't like to enter : : for the time.only they like to enter the nuumber of the clock not :
help me how can do it?
|
|
|
|
|
roshanak wrote:
I want to write a program that user should enter the time
and they don't like to enter : : for the time.only they like to enter the nuumber of the clock not :
help me how can do it?
"enter the number of the clock"? I have no idea what that means... Give an example of what you want the user to enter, what does it look like? Are you saying that the users will enter something like "1530" or "330" instead of "15:30" or "3:30"?
RageInTheMachine9532
|
|
|
|
|
i agree with Dave.
try giving detail; no one can help you.
------------------------
Jordan.
III
|
|
|
|
|
Hi Dear,
for your problem you can use these methods :
1) Use Microsoft mask edit control
2) validate your text box when user press any key by controlling on Key_pressed event.
.
M.R.O (Mohammad reza Ordubadi) ordubadi@Ittoolbox.net
|
|
|
|
|
Hi
How can I use a combo box in a column of datagrid ?
I mean this column should word like a combobox
|
|
|
|
|
Hi Dear,
you can use any control in datagrid but it has many tips and tricks.
you can use textbox and datacombo for this target.
with row_col_change event you should these acts :
1)move text box to the specific cell with .move method
2)read cell data and move it to text box .
.......... for more information about this please contact with me : ordubadi@ittoolbox.net or mohammadord@hotmail.com
bye.
M.R.O
|
|
|
|
|
I've made a program and now the problem is that you can run it more than once... How can you check if the program is already running and if the program is running and if you then try to run the program once more then it'll give an error message??
(¯`·._.·[eRiK]·._.·´¯)
|
|
|
|
|
put the following:
if app.PrevInstance then
MsgBox "This app is already running!"
end
end if
If it's broken, I probably did it
bdiamond
|
|
|
|
|
I have no idea of make files. is there any sample makefile code available.
|
|
|
|
|
I'm using VB 6.0 and I think this method will also work in VB .NET, this method is called the: FSO, the FileSystemObject. Whit this you can create, delete, modify etc. files... But, if you want to make FSO work right, in VB6.0 you'll have to go to Project -> References and then you'll have to select the following:
Microsoft Script Control 1.0 and Microsoft Scripting Runtime.
Now you can use FSO, two samples:
Make a textfile and write into it:
Dim fso, file<br />
Set fso = CreateObject("Scripting.FileSystemObject")<br />
Set file = fso.CreateTextFile("your file.txt or .dat", True)<br />
file.Write ("something")<br />
file.Close<br />
Removing a file:
<br />
Dim fso, file<br />
Set fso = CreateObject("Scripting.FileSystemObject")<br />
Set file = fso.GetFile("your file.txt or .dat")<br />
file.Delete<br />
One thing, you can create any file with any extension (.txt, .dat, .erik) only it'll still be like an NotePad file with an different extension... So making .exe files is no use...
I hope I solved your problem !!
(¯`·._.·[eRiK]·._.·´¯)
|
|
|
|