Hi,
Thanks everybody for your help! The example in the link provided by RoyVidar (A Star for you) closes the excel. But it does not update in my case. I use xlApp.Workbooks.Open instead of xlApp.Workbooks.Add. It updates when the line xlBook.Saved = True is changed to xlBook.Save. Thanks again...
Hi,
The Excel is not closed after calling the vb code below. Help, please!
Dim xlObject As Object
Set xlObject = CreateObject("excel.application")
xlObject.Application.Workbooks.Open "C:\Report\Report.xls"
Worksheets("report").Activate
......
Worksheets("report").Cells(1, 2).Value =...
Still not work. The order of the references are:
Visual Basic For Applications
Visual Basic runtime objects and procedures
Visual Basic objects and procedures
OLE Automation
Microsoft DAO 3.6 Object Library
Microsoft Access 9.0 Object Library
Microsoft Script Control 1.0
Thanks for your help!
wshom.ocx is properly registered. One time we had one not registered, we got the error message: "Component 'DBLIST32.OCX' or one of its dependencies not correctly registered: a file is missing or invalid". Thanks!
Hi,
I got the error "Run-Time error '-2147024894 (80070002)': Method '~' of object '~' failed" when I run the following program: (MyProgram.exe is a VB executable)
Dim objWsh As Object
Set objWsh = CreateObject("wscript.shell")
objWsh.Run ("C:\MyProgram.exe")
Set objWsh =...
Hi,
Everytime I run the following VB program, a WINWORD.EXE process is started. How could I terminate WINWORD.EXE? Thanks in Advance!
Private Sub ModifyWordDocument()
Dim strDocumentPath As String
strDocumentPath = App.Path
OpenDocument strDocumentPath & "\student0.doc"...
Hi Denster,
I am new VB user.
Now I am doing mail merge using VB6 but I could not use the data pull from oracle merge to main word document?
I tried to use the code segements in your posting but when I compile it, I got error (invalid use of property)
for this statement...
Hi, FrameA is always visible and a PictureBox is only visible when a field in FrameB has focus on it. After the field lost focus, the PictureBox will become invisible again. Right now FrameA is on top of the PictureBox. Is there any property I can change to make the PictureBox on top of FrameA...
Yes, Rob. The same error message. But it worded when I moved this to another machine. I guess this has something to do with Word setting on this computer. Thanks!
I want to count the number of records in a word document datafile. I don't know why it didn't returen the number of records(there records there) but always -1. Can someone point out what is wrong with this? Thanks in advance.
Rob: It's a data source file used to do mail merge. Basically I want to count how many records in the file --- I can do it for a text file. Is there any way to count how many lines or how many new lines in this file? Thanks!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.