Export MSAccess Memo Fields to Excel Cell Comments HELP!!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've been at this for over a week and about 16 hours. Can someone point me
in the direction to export a memo field from an Access (Office 2000) Query or
Table to an Excel (Office 2000) spread sheet comment?
 
Here's sample code (based loosely on
http://www.mvps.org/access/modules/mdl0006.htm at "The Access Web") that
creates a new workbook that has one populated cell and a comment for that
cell. Hopefully this is enough to get you started.


Sub sTestXL()
Dim objXL As Object
Dim objActiveWkb As Object
Dim strFileName As String

strFileName = "C:\MyTest.xls"

Set objXL = CreateObject("Excel.Application")

objXL.Application.Workbooks.Add
Set objActiveWkb = objXL.Application.ActiveWorkbook

With objActiveWkb
.Worksheets(1).Cells(1, 1) = "Hello World"
With .Worksheets(1).Cells(1, 1).AddComment
.Visible = False
.Text "reviewed on " & Date
End With
End With

objActiveWkb.Close SaveChanges:=True, FileName:=strFileName
objXL.Application.Quit
Set objActiveWkb = Nothing
Set objXL = Nothing

End Sub
 
Back
Top