I have code VBA code written in MS Access 2010 (.mbd file) to write data into an Excel file (.xls file). Below is the code to write data into that excel file. When you run this code, it always throws Error#1004 "Application-defined or Object-defined error". When you debug the code (F8) or run it (F5), it runs absolutely fine with out any issues. I am still not able to figure it out on what exactly the issue is. This code works fine when executed in MS Access 2007.
Below is thr code that's getting executed and when it fails, the focus is set on the 3rd last line of the code marked in double astriek mark.
Sub PopulateReport(appExcel As Object, testcam)
Dim Site As String, intRec As Integer, i As Integer, cnt As Integer, intRecSet As Integer, cntr As Integer
Dim F1 As String, F2 As String, F3 As String, F4 As String, F5 As String, F6 As String, F7 As String
Dim F8 As String, F9 As String, F10 As String, F11 As String, F12 As String, F13 As String, CAMDate As Date
i = 0
cnt = 0
cntr = 0
Set cnn = CurrentProject.Connection
rec.Open "SELECT * FROM Site", cnn, adOpenStatic, adLockPessimistic
intRec = rec.RecordCount
Do Until cnt = intRec
Site = rec(4)
Select Case Site
Case "Fort Worth"
cntr = 0
recset.Open "SELECT * FROM Employee", cnn, adOpenStatic, adLockPessimistic
intRecSet = recset.RecordCount
Do Until cntr = intRecSet - 1
cntr = cntr + 1
appExcel.Application.CutCopyMode = False
go = appExcel.Application.Range("START_FW2_CL")
cntr = 1
With appExcel.Worksheets("Accts. > Clearing").[START_FW2_CL]
Do Until recset.EOF
**.Offset(cntr, 0) = recset(0)**
.Offset(cntr, 1) = recset(1)
.Offset(cntr, 2) = recset(2)
I am using VB.net & Visual Studio 2013 , I like to write a Windows CE application
After searching on the internet I installed VS Update 4, vsSdk, Windows Mobile 6 Standard SDK Refresh, Windows Mobile 6.5 Professional Developer Tool Kit (USA), But nothing is working ,I still don't get the template I did a lot of reading on this issue but I still don't know what do I need to install or where to get it in order to write a VB.net Windows CE application ,
I am using ms excell as database in vb 6.0 , i am having two sheets (tabel) one is having master another one is outstanding
master table is not contain some CODE and NAME.
i want the result of Which CODE and name is not in master
and that code also want to update in master sheet
replace VB6 with some other environment. Perhaps VB.Net Express edition if you need a free environment. VB6 has been discontinued years ago and is not supported
not to use Excel as a database. Instead you can use for example SQL Server Express edition (again a free environment). When data handling operations get more complex Excel is no more able to provide tools and techniques you need to handle complex situations
I’m hoping someone can help please, even if it’s just to say you can’t do that. I’ve just starting dabbling with VB. I’m using the i00Spellchecker and it works great. What I’m trying to do is check if the last word typed is correct and if not automatically bring up let’s say just an msgbox.
Does anyone know if there is a command or something that I can run that will check if a word is bad or the red underline is there or something like that? All the information I can find on i00 just says the same thing as previous site.
Thank you in advance
Can anyone please point me in the right direction.
Well without some more detailed information that is not easy. Do you know how to extract data from a Word Document? Do you know what form that data will be stored in? Do you have experience of using databases?
Working with Word documents is new to me. I'm using Office 2010, VS 2012 and SQL Server 2012.
What I need to do is:
My users need to fill out a template providing some informatie.
Next I need to be able to extract those information from the word document and put it in the sql server database.
All this needs to be done by a stand-alone application.
Hope I provided enough detail with this answer.
So if you can tell me where I can find information, like a tutorial or an example, regarding these issues that would be most appreciated.
Unfortunately the information you provided is not specific enough to be answered in a forum such as this. Incidentally, I do not understand why you think you need to use MS Word in your application. Why not just create a Windows Forms app so the user can enter the data direct, and the application can save it to the database.
I need to use Word because that's how the users are providing the data. I think Chris gave me a good tip there. I already encountered article talking about creating templates with bookmarks to indicate the data you want to port to a db.
Tnx anyway for your time Richard.
need to use Word because that's how the users are providing the data.
Why, when a Windows Forms application would be so much simpler? The user sees exactly the same sort of template, and the application can handle the data without the complexity of working with the Word interface.
Last Visit: 31-Dec-99 18:00 Last Update: 4-Oct-22 6:50