Re: Access to Excel
- From: John Nurick <j.mapSoN.nurick@xxxxxxxxxxxxxx>
- Date: Sat, 17 Feb 2007 07:32:20 +0000
Hi Steve,
Naming fields with words that are also the names of common functions or
properties sooner or later causes problems, so don't use "Name" as a
name. Use something else, e.g. PartName.
The general idea is
1) set a reference to the Microsoft Excel Object Library
2) Then use VBA code along these lines (this is untested air code):
Dim oBook As Excel.Workbook
Dim strPartName As String
Set oBook = GetObject("D:\Folder\File.xls")
'need to add a criterion to the next line to specify the record
strPartName = DLookup("PartName", "MyTable", ???)
oBook.Names("PartName").Value = strPartName
oBook.Close True
On Fri, 16 Feb 2007 21:07:22 -0800, Steve.M
<SteveM@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Basically I want to type a name in an access table/field titled name. I want
the name to simply be inserted in a cell named name in excel. I want that
done on 3 excel forms.
The excel forms are just report forms with a description part number etc. no
calculations or special features, just type and save.
Everything I have read seems to say that I can, but how? Please help.
--
John Nurick [Microsoft Access MVP]
Please respond in the newsgroup and not by email.
.
- Follow-Ups:
- Re: Access to Excel
- From: Steve.M
- Re: Access to Excel
- Prev by Date: Re: Creating a report in MS Word using template with bookmarks
- Next by Date: Re: Filter Table to be imported
- Previous by thread: Re: Creating a report in MS Word using template with bookmarks
- Next by thread: Re: Access to Excel
- Index(es):
Relevant Pages
|
Loading