Underlining a Value in a Variable
Closed
AdiK
-
Nov 23, 2016 at 05:32 AM
yg_be Posts 23405 Registration date Sunday June 8, 2008 Status Contributor Last seen December 20, 2024 - Nov 24, 2016 at 04:12 PM
yg_be Posts 23405 Registration date Sunday June 8, 2008 Status Contributor Last seen December 20, 2024 - Nov 24, 2016 at 04:12 PM
Related:
- Underlining a Value in a Variable
- My documents environment variable - Guide
- Underline symbol in computer - Guide
- Parse error: syntax error, unexpected variable - Guide
- How to remove underline in css - Guide
- Creation d'une table de nom variable dans mysql avec php - Programming Forum
2 responses
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Nov 24, 2016 at 11:36 AM
Nov 24, 2016 at 11:36 AM
Hi AdiK,
You can't apply format to a variable, but you can to a cell.
Best regards,
Trowa
You can't apply format to a variable, but you can to a cell.
Sub underline() Dim x As Variant x = "Hello" Range("A1") = x Range("A1").Font.underline = True End Sub
Best regards,
Trowa
yg_be
Posts
23405
Registration date
Sunday June 8, 2008
Status
Contributor
Last seen
December 20, 2024
5
Nov 24, 2016 at 04:12 PM
Nov 24, 2016 at 04:12 PM
I would rather try something such as :
A good method to learn about that is to record a macro while manually changing the format of a cell : you will see in the recorded VBA code how to programmatically access those attributes.
Range("A3").Font.Underline = xlUnderlineStyleSingle
A good method to learn about that is to record a macro while manually changing the format of a cell : you will see in the recorded VBA code how to programmatically access those attributes.