|
-
Sep 19th, 2003, 02:17 PM
#1
Thread Starter
Fanatic Member
excel file
I am working with access in vb anjd i want to have there be a file in the "\" directory called excel1, how do i do this in my application?
C#.net, VB, C++, Java, VS 2005/2008
Dont' forget to rate posts that are helpful to you.
-
Sep 20th, 2003, 03:19 AM
#2
Your question isn't very clear? Do you want to create a file named excel1 in the same directory as your app?
-
Sep 20th, 2003, 04:18 AM
#3
Thread Starter
Fanatic Member
C#.net, VB, C++, Java, VS 2005/2008
Dont' forget to rate posts that are helpful to you.
-
Sep 20th, 2003, 04:32 AM
#4
Thread Starter
Fanatic Member
also it wont let me do
VB Code:
appExcel.Range("B1").Value = text1.Text
C#.net, VB, C++, Java, VS 2005/2008
Dont' forget to rate posts that are helpful to you.
-
Sep 20th, 2003, 05:42 AM
#5
The following link will give you an example of how to do what you're after. HTH 
http://www.erlandsendata.no/english/vba/adodao/
-
Sep 20th, 2003, 07:23 AM
#6
Thread Starter
Fanatic Member
sort of but i dont really understand it all, and i dont need to use access jsut excel.
C#.net, VB, C++, Java, VS 2005/2008
Dont' forget to rate posts that are helpful to you.
-
Sep 21st, 2003, 12:04 AM
#7
If you just want to use Excel then this thread is what you're after.
http://www.visualbasicforum.com/show...ght=save+excel
-
Sep 21st, 2003, 07:45 AM
#8
Thread Starter
Fanatic Member
why cant i use this line
VB Code:
appExcel.Range("B1").Value = text1.Text
?????
C#.net, VB, C++, Java, VS 2005/2008
Dont' forget to rate posts that are helpful to you.
-
Sep 21st, 2003, 08:46 AM
#9
If you have declared everything then it should work. Can you post all the code you're working with so we can have a look to see if you may hve over looked something.
-
Sep 21st, 2003, 09:55 AM
#10
Thread Starter
Fanatic Member
VB Code:
'Reference Microsoft Excel 8.0 Library Object or up from your program first
Sub command1_click()
Dim appExcel As Excel.Application
Set appExcel = New Excel.Application
appExcel.DisplayAlerts = False
appExcel.Visible = False
appExcel.ScreenUpdating = False
appExcel.Workbooks.Open FileName:="c:\myfile.xls"
appExcel.Worksheets("Sheet1").Select
Range("A2").Value = text2.Text
appExcel.ActiveWorkbook.Close Savechanges:=True
appExcel.Quit
Set appExcel = Nothing
MsgBox "Process Complete!"
End Sub
C#.net, VB, C++, Java, VS 2005/2008
Dont' forget to rate posts that are helpful to you.
-
Sep 22nd, 2003, 03:37 AM
#11
There is nothing wrong with your code???
What line does the error occur?/?
-
Sep 22nd, 2003, 04:10 AM
#12
Thread Starter
Fanatic Member
there is no error , but the text doesnt go to the block on the excel form.
C#.net, VB, C++, Java, VS 2005/2008
Dont' forget to rate posts that are helpful to you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|