|
Hi Dave Kreskowiak,
Thanks for replied me. I called Quit() before i released it. And i also used
System.Runtime.InteropServices.Marshal.ReleaseComObject(appExcel)<br />
<br />
Dim proc As System.Diagnostics.Process<br />
For Each proc In System.Diagnostics.Process.GetProcessesByName("EXCEL")<br />
proc.Kill()<br />
Next
to relase it. but it still throws exception: HRESULT:0x800A03EC
i love IT
|
|
|
|
|
You should NOT be releasing the COM object yourself.
If you're creating multiple sheets in your code in one pass, are you creating multiple Excel application objects? Don't! Create one Excel application object and reuse it to create every sheet and workbook your need.
Another possibility is that your using the Excel Interop Assemblies for one version of Excel, say 2003, and your machine doesn't have Office 2003 installed, maybe you have Office 2000 or XP instead. If you're going to use the Interop Assemblies, you have to match the version of Office that's installed on the machine.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi Dave,
Thanks for helped me and replied to me.
The reusing is a good idea. In fact, my app ran better, but after about 10 excel files that exception was showed.
Note: i have 1000 htm files and i wan convert them into excel.
i love IT
|
|
|
|
|
Hi , Can anyone help me in this problem ...
I am popuating three textboxes in a GridView from my DB ... Now, I want to change values in these textboxes and save all rows when User presses 'Update' Button. What happens is , when 'Update' is pressed, there is PostBack on the page and all values in TextBoxes are shown as Null ..How can I save my previously displayed values in TextBoxes ?
|
|
|
|
|
Watch the forum where you are posting...
Mubashir
Every job is a self portrait of the person who did it.
|
|
|
|
|
VS 2005 (VB.Net)
Is it possible to open a form by a string name without having to declare the form first ,
ie
normally you would
Dim SomeForm as New FormName
SomeForm.Show
What i wasnt yo do is create a dynamic form, and when the user clicks a button it open a corraspoinding form. As each user will have different 'buttons' on there forms i want to have a routine that i can parm a formname in as a string and it open the form.
ie
Dim FormName as String = 'SomeFormName'
FormName.Show
Any idea's
I really do need help..... all this computer stuff is way over my head !!
|
|
|
|
|
No i don't think so. Why do you need to do it this way?
Posted by The ANZAC
|
|
|
|
|
I do know thre is a way of doing this, as i have seen the code, just carnt remember it. The reason i want to do it this way is that there are a number of users that will be using this application, each one on them will have a 'main selection screen' which will have upwards of 20+ options. each option will open a new form. NOT all the operators will have the same options so rather than have a while load of code declaring every form, i just want a small simple routine.
I really do need help..... all this computer stuff is way over my head !!
|
|
|
|
|
yes its Absolutely possible to do so and can be done very neatly in VB2.0,Just give me a day I will post the Code snippet . but before that I want to know you require that and how you got this nagging idea
Navneet.Hegde
navneethegde@yahoo.co.in
Live Life Kingsize
|
|
|
|
|
we have an inhouse menu type application, when a operator logs onto the stytem , ihave a function that dynamicly creates the menu oprtions for this operator from there profile. ie in design tine the form is blank, but buttons ( options buttons ) , and click even handlers are generated for all the area's they are allowed to access. this info is held in a SQL2005 table
ie .. Operator 1 can access area's 1,2,3, and 4 so would have 4 buttons on screen , Operator 2 can only access area's 1 and 4 hance only has two buttons. As the buttons are dynamicly generated the indexes ( start at 0 ) are never the same. in the example above operator button index 1 would be for Area 2 where as for operator 2 it would be for area 4
i have a work round by Dimming every form and then using the button text in a case statement to determine which button was clicked, but that means every time i add a new form i have to remember to add it in the select case statement ...
If i can use the form name form the SQL table in a simple routine it will save endless pages of coding and i wont have tp remember to keep comming back to the master form and adding the reference in
its the simple idea's that prove to be the hardest !!
I really do need help..... all this computer stuff is way over my head !!
|
|
|
|
|
:-Ook dear I will just post it as i get back to my PC . I just wanted to know the reason for reaching this end of programming .
my reason for digging this code is that we wanted to build application dynamically and form name were all in database
Navneet.Hegde
navneethegde@yahoo.co.in
navneethegde@gmail.com
navneet.hegde@procit.com
Live Life Kingsize
|
|
|
|
|
Hi
I want to use window's Task Scheduler as a VB.NET application.How can i do that? I tried using in windows service application,but could not reach to perfect solution. and not that i want to have the exact functionality of the task scheduler but with some modifications. Like:
application:
-=-=-=-=-=-=-=-==-=-
1) create a windows service application. and place a textbox and a button. And when i enter the path of the appliction in the textbox and press the button, i should find the apllication in that particular task scheduler's tasks.
2) and by applying some settings.I need to get the application start after systen startup.
please help me in this context
thanks in advanced
tirumal
-- modified at 6:08 Wednesday 27th December, 2006
|
|
|
|
|
I'm planning on using inpout32.dll and I want to control some LEDs, but this is how i want todo it. Im using a program already that sets the bits on/off for the LEDs to be on/off.. Now in this new VB program I want to just turn off 1 of the LEDs of my choice and leave the others as-is. How would I do this? I don't know much about parallel port access. Thanks in advance
|
|
|
|
|
|
now I am doing the spliting the fileName.when spliting the file remove the file's Extension and i want without extension fileName for only and displaying the fileName in Listbox..pls someone help me...........
Thanking you
somasundaram
|
|
|
|
|
Dim string 'filename you want to play with<br />
ResultingString = string.remove(string.indexof("."), string.length - string.indexof("."))
Alternatively:
Dim i As integer = string.indexof(".")<br />
Dim x as integer = string.length - i<br />
<br />
ResultingString = string.remove(i,x)
Posted by The ANZAC
|
|
|
|
|
this is file Name :
somu-VB.Net-bangalore-3-somu@pnb.com.txt
I've worked this coding.but My txt file format is :somu-VB.Net-bangalore-3-somu@pnb.com.txt How can i put that coding So Pls...help me...
Thanking you
somasundaram
|
|
|
|
|
that did not make much sense, as i understand it you want the @ symbol and all after it removed. To do this, you can use the code i gave you, the second set of code. Just replace the "."code> with <code>"@" . That should work. If this is not what you wanted, please take the time to carefully explain what you mean.
Posted by The ANZAC
|
|
|
|
|
I've applied ur coding part.but I got this error "Object reference not set to an instance of an object "
z = strs.IndexOf(".txt")
Dim x As Integer = strs.Length - z
ResultingString = strs.Remove(z, x)
ResultingString = ListBox1.SelectedIndex
Pls Help Me very Urgent
thanking you
somasundaram G
|
|
|
|
|
This is very easily done using the <a href="http://msdn2.microsoft.com/en-us/library/system.io.path.getfilenamewithoutextension.aspx">Path</a>[<a href="http://msdn2.microsoft.com/en-us/library/system.io.path.getfilenamewithoutextension.aspx" target="_blank" title="New Window">^</a>] class and its GetFileNameWithoutExtension method.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
use Path Class simple And you can easily get filenamewithoutextension Property .
Navneet Hegde
navneethegde@yahoo.co.in
Live Life Kingsize
|
|
|
|
|
Dim fileName As String = "C:\mydir\myfile.ext"
Dim result As String
result = Path.GetFileNameWithoutExtension(fileName)
Navneet.Hegde.
navneethegde@yahoo.co.in
Live Life KingSize
|
|
|
|
|
Thank U Very much for everybody......
thanks lot.....
thanking You,
somasundaram
|
|
|
|
|
could any one please give me the code for opening word, excel and html, inside vb forms and get them to read by microsoft agent 2,
i can open a word document by VB.net outside the form but not inside the form, also can't find code for MS agent that can read an word outside or inside the form.
could any one direct me towards any source for agent codings please, i can't find enough samples or good documentation for using agent 2 in VB.net 2005
i do need this quite urgently
thankyou
|
|
|
|
|
aa2002uk wrote: i do need this quite urgently
No can do.
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
|
|
|
|