Comment !

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

Guest

I have a field on a for called [Receiving date] , i have another field
called [contents], i have a buuton "Export to Excel" ,that when i click
exports the form's data into Excel.

The question is : is it possible to export the field [contents] in the
Excel sheet as a comment on the cell of [Receiving date] ?
Regards
 
from Hong Kong, RainbowSix

in your Access application, need to use Excel Object Library in VBA
in Excel Object, here have about comment object, you can check in Help to
see that method, properites and how to use



"Pietro" 來函:
 
How ?
Could you be more clear ?
Thanx

Rainbow01 said:
from Hong Kong, RainbowSix

in your Access application, need to use Excel Object Library in VBA
in Excel Object, here have about comment object, you can check in Help to
see that method, properites and how to use



"Pietro" 來函:
I have a field on a for called [Receiving date] , i have another field
called [contents], i have a buuton "Export to Excel" ,that when i click
exports the form's data into Excel.

The question is : is it possible to export the field [contents] in the
Excel sheet as a comment on the cell of [Receiving date] ?
Regards
 
from Hong Kong, RainbowSix

i mean you can use Excel Object in your access application, you can find in
Help for excel object
do not use Docmd.Transferspreadsheet ....
you can use : For Next loop to add each record from access to excel


"Pietro" 來函:
How ?
Could you be more clear ?
Thanx

Rainbow01 said:
from Hong Kong, RainbowSix

in your Access application, need to use Excel Object Library in VBA
in Excel Object, here have about comment object, you can check in Help to
see that method, properites and how to use



"Pietro" 來函:
I have a field on a for called [Receiving date] , i have another field
called [contents], i have a buuton "Export to Excel" ,that when i click
exports the form's data into Excel.

The question is : is it possible to export the field [contents] in the
Excel sheet as a comment on the cell of [Receiving date] ?
Regards
 
Dear Rainbow,
I'm sure that you are the only one who can help me
please note that i'm stll a beginner,so,could you please describe me the
details step by step?
Best Regards

Rainbow01 said:
from Hong Kong, RainbowSix

i mean you can use Excel Object in your access application, you can find in
Help for excel object
do not use Docmd.Transferspreadsheet ....
you can use : For Next loop to add each record from access to excel


"Pietro" 來函:
How ?
Could you be more clear ?
Thanx

Rainbow01 said:
from Hong Kong, RainbowSix

in your Access application, need to use Excel Object Library in VBA
in Excel Object, here have about comment object, you can check in Help to
see that method, properites and how to use



"Pietro" 來函:

I have a field on a for called [Receiving date] , i have another field
called [contents], i have a buuton "Export to Excel" ,that when i click
exports the form's data into Excel.

The question is : is it possible to export the field [contents] in the
Excel sheet as a comment on the cell of [Receiving date] ?
Regards
 
I have a field on a for called [Receiving date] , i have another field
called [contents], i have a buuton "Export to Excel" ,that when i click
exports the form's data into Excel.

The question is : is it possible to export the field [contents] in the
Excel sheet as a comment on the cell of [Receiving date] ?
Regards

I would suggest you export the data as is and then use a Macro within
Excel to create the comment for each [Receiving Date] cell using the
content cell as it's text.

In Excel create a new macro.

Sub MakeComments()

Dim intX As Integer
Dim intY As Integer
Application.ScreenUpdating = False
' Get the last cell with data in the column
intY = ActiveSheet.Range("A").End(xlDown).Row
For intX = 2 To intY
Range("A" & intX).Select
Range("A" & intX).AddComment
Range("A" & intX).Comment.Text Text:=Range("B" & intX).Value
Next intX
Application.ScreenUpdating = True
End Sub

The above assumes the [Receiving Date] column is in Column A, and the
[Comment] column is column B.
A1 is Column Header, so A2 is the first row to be commented.
You can add code to delete Column B after Column A is commented.

Adjust the code as needed for your worksheet.
Run the macro to comment Column A.
 
from Hong Kong, RainbowSix

please don't say this > I'm sure that you are the only one who can help me
just only share my experiences in developing access application
here are many expert users

i think u must know to use VBA, if not, a lot of things cannot be done in
MsOffice
method are here:
use Excel object in your AccessVBA, here are about use comment object in
excel with using vba
e.g. Range("A1").AddComment
Range("A1").Comment.Visible = True
Range("A1").Comment.Text Text:="My Comment here!"
use For Next loop with the above method to add each record from access
to excel

"Pietro" 來函:
Dear Rainbow,
I'm sure that you are the only one who can help me
please note that i'm stll a beginner,so,could you please describe me the
details step by step?
Best Regards

Rainbow01 said:
from Hong Kong, RainbowSix

i mean you can use Excel Object in your access application, you can find in
Help for excel object
do not use Docmd.Transferspreadsheet ....
you can use : For Next loop to add each record from access to excel


"Pietro" 來函:
How ?
Could you be more clear ?
Thanx

:

from Hong Kong, RainbowSix

in your Access application, need to use Excel Object Library in VBA
in Excel Object, here have about comment object, you can check in Help to
see that method, properites and how to use



"Pietro" 來函:

I have a field on a for called [Receiving date] , i have another field
called [contents], i have a buuton "Export to Excel" ,that when i click
exports the form's data into Excel.

The question is : is it possible to export the field [contents] in the
Excel sheet as a comment on the cell of [Receiving date] ?
Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top