FLabrecque
Registered User.
- Local time
- Yesterday, 20:45
- Joined
- Nov 9, 2004
- Messages
- 93
Hi everyone!
I'm using Access to generate an Excel file. I'm exporting my query in Excel format. Then I open it in Access and do a bunch of cosmetic changes (such as making lines, bold titles, etc).
I'm also creating comments inside the Excel file based on information stored in a table. The comments appears fine (although they are always in bold character, but I can live with that). My problem comes with the default size of the comment block. They are too small. I need to make them bigger with code from Access.
The code I'm using to create the comment in Excel is this:
I can't find anything in Access or this forum to help me. I've tried to create a macro in Excel to see how it works. Here it is:
For some obscure reason, when I try to execute the macro again, it stops at the first shaperange with a "object doesn't support this property or method".
With all this said, my question is this: How can I resize the comments in an Excel file through Access coding?
Thanks!
I'm using Access to generate an Excel file. I'm exporting my query in Excel format. Then I open it in Access and do a bunch of cosmetic changes (such as making lines, bold titles, etc).
I'm also creating comments inside the Excel file based on information stored in a table. The comments appears fine (although they are always in bold character, but I can live with that). My problem comes with the default size of the comment block. They are too small. I need to make them bigger with code from Access.
The code I'm using to create the comment in Excel is this:
Code:
xlsSheet.Range(xlsSheet.Cells(1, 1), xlsSheet.Cells(1, 1)).AddComment.Text strCOMMENT
I can't find anything in Access or this forum to help me. I've tried to create a macro in Excel to see how it works. Here it is:
Code:
Range("A5").Comment.Text Text:="labref01:" & Chr(10) & "This is my comment!" & Chr(10) & ""
Selection.ShapeRange.ScaleWidth 1.82, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.58, msoFalse, msoScaleFromTopLeft
For some obscure reason, when I try to execute the macro again, it stops at the first shaperange with a "object doesn't support this property or method".
With all this said, my question is this: How can I resize the comments in an Excel file through Access coding?
Thanks!
Last edited: