|
hi,
I want to create a excel file in vb..the data is in 4textbox(let).
those information has to go to the EXCEL file.
Paritosh
|
|
|
|
|
Private Sub Command1_Click()
Dim ExcelBook As Excel.Workbook
Dim Esheets As Sheets
Dim Esheet As Excel.Worksheet
Dim ExcelApp As Excel.Application
Set ExcelApp = New Excel.Application
Set ExcelBook = ExcelApp.Workbooks.Add(1)
ExcelApp.Visible = True
Set Esheets = ExcelBook.Sheets
ExcelBook.Activate
Set Esheet = Esheets(1)
With Esheet
.Activate
.Cells(1, 1) = Text1.Text
.Cells(1, 2) = Text2.Text
.Cells(1, 3) = Text3.Text
.Cells(1, 4) = Text4.Text
.SaveAs "C:\1.XLS"
End With
ExcelBook.Close
ExcelApp.Quit
Set Esheet = Nothing
Set Esheets = Nothing
Set ExcelBook = Nothing
Set ExcelApp = Nothing
End Sub
|
|
|
|
|
Don't forget to tell him to Add the reference of Microsoft Excel.
|
|
|
|
|
I am trying to create a windows application with just the form floating around and bouncing off when it hits the edge of the monitor with some text being displayed. How do I do this?
|
|
|
|
|
I am the one; I am genius wrote: I am the one; I am genius
Well... you're the genius - you tell us
...Steve
"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|
|
You're really killing me!
|
|
|
|
|
He neither gave you a fish, nor a snippet of code ...
<< >>
|
|
|
|
|
I am writing a dictionary same as "Just Click'n'See" software (English to Vietnamese).
I want to read text under mouse from any Application.
I am using Hook technology to determine Window which is activing. Example, when I click mouse in the text of any application then I want to put that text into a variable. Please help me.
Thank you very much.
|
|
|
|
|
You can use the hook of Global
|
|
|
|
|
I am sorry. I don't know your idea. Please write more detail. Thanks!
thank you for helping
|
|
|
|
|
MyNothing wrote: You can use the hook of Global
This makes as much sense as screen doors on a submarine.
...Steve
"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|
|
really I don't know the way which you show me. Can you tell clearly?
thank you for helping
|
|
|
|
|
This is, actually, quite difficult to achieve. There are two general schools of thought on how to do this. Since text can show up in any number of controls, there is no one standard method that works for all those controls.
The first theory is, you have to retrieve the window handle of the control that the mouse is over, put together a WM_TEXT message, send the message to that window handle and hope that window responds to the message. This will give to ALL the text in the control, not just under the mouse pointer. That's the easy part. The very hard part is calculating what text is under the mouse pointer. Your guess is as good as any as to how you're going to do that reliably.
The other theory involves OCR algorithms and reading the area of the screen under the mouse pointer. Just putting together an OCR package that works with all the different fonts you'll find under the mouse pointer will be just as hard as theory number one.
But, it can be done...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for your helping. Now, I can take the image at mouses'position. But I don't obtain result that I want to take. Now I want to read the text in that image. If you have some code, please share me. (VB.NET).
|
|
|
|
|
That where the OCR (Optical Character Recognition) comes in. Search the Articles for OCR and you'll find some examples. Good Luck implementing it!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello!
I understand OCR. Thank you vary much. Now I have OCR code by C#. I think it is very difsicult to analyse some text in image. I am trying to finish my Software.
thank you for helping
|
|
|
|
|
hello,
i have used combobox in one webform and the selected combo box data should get retrived into another webform..as input
plz help me in this regard.
Thanks & Regards
Nagalakshmi
|
|
|
|
|
hello,
I have to generate table control dynamically ,the rows and columns are created dynamically and i have used stored procedure in sqlserver and the data present in sqlserver should generate dynamically into table contol..
plz help me in this regard..
Thanks & Regards
Nagalakshmi
|
|
|
|
|
hello. u know i would like to writing developing program for pocket pc, i would like it to be like this, when the user log-in with correct information,then he can go into another form,here in this form will have listfolders,listing the files i designed for users.....so what codes can be used to create the parts after log-in correctly?
thanx
go ahead...do best on my works....
|
|
|
|
|
|
MyNothing wrote: Similar To Topic
WTF are you talking about? Given some of the other responses you've posted here I believe that you have nothing sensible to add to the discussions.
...Steve
"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|
|
No, but it's on the way out.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi everyone, I was wondering if anyone knows of an article or some sort of code snippet that could help me with my problem. I have a custom combo box that inherits from the vs.net toolbox combobox. I am needing my combobox to set the selected index to -1 when the user either types a value that is not in the list, or deletes the text in the combobox making the value = "". I have tried to set the selected index in the key up event by calling a function that sets the selected index = -1 twice eg. comb.selectedIndex = -1 (newline) comb.selectedIndex = -1. This doesn't seem to work very well. I have attempted to search through the articles on codeproject with no luck finding any of the combobox articles that set the selected index to -1. They all seem to set the index = 0. Any help would be really appreciated. Thank you.
eatwork
|
|
|
|
|
i want to find out if any event is alive or not from another event so that if my desired event is alive then i will remove it and then proceed.
any one help me
Jibon
|
|
|
|
|
What do you mean by "alive"? If I understand this correctly, there's not way to do this.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|