access visual basic training - format bold
Microsoft Office TrainingThe UK's Number 1 for Microsoft Office Training Sitemap add this page to your favourites/bookmarksBookmark page
 
view a printable version of this pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft VBA Training and help » access visual basic training - Format bold

access visual basic training - Format bold

resolvedResolved · Low Priority · Version Standard

replyReplyThu 20 Dec 2007, 16:38Delegate Manuela said...

Format bold

Is it possible to build up a character string and make part of that string bold?

I was hoping that maybe I could concatenate a code for bold to some previous concatenated fields (and text) and then at the end of what needed to be bold I could then concatenate a code to switch it off

No rush for this
Hope my explanation has not been confusing!!

Thanks
Manuela

For upcoming training course dates see: Pricing & availability

replyReplyTue 29 Jan 2008, 12:30Trainer Carlos said...

Format Sections of a String as Bold

Hi Manuela

You cannot bold a variable or part of a string while its a variable, so I'm showing you how to do it after it is placed in a cell.

The code below takes the phrase:

Hello My Name is Carlos. Welcome to Excel VBA

in Range ("A1") and bolds the words "Carlos" and "Excel"

The default code line for this is:

Rng.Characters(Start, Length).Font.Bold = True

The Bracket sets the Start and Length of the section to be made Bold

Sub MakePartOfStringBold()

Dim Rng As Range

Set Rng = ActiveSheet.Range("A1")

Rng.Characters(18, 6).Font.Bold = True 'Bolds "Carlos"

Rng.Characters(37, 5).Font.Bold = True 'Bolds "Excel"

End Sub


Hope this helps

Carlos

replyReplyThu 7 Feb 2008, 12:27Delegate Manuela said...

RE: Format Sections of a String as Bold

Sorry for delay in getting back to this.

Thanks for this. Have got this working in Excel but would you know of anything like this that works in Access Reports as my string that I am building up is being output to an Access Report?

Many thanks

Manuela

replyReplyThu 28 Feb 2008, 15:26Delegate Manuela said...

RE: Format bold

Hello

My further question seems to have been lost in the ether! I was wondering if you could think of a way to do this in Access reports as the string with the bold in it is needed to output bibliographies?

Thanks again
and regards

Manuela

 

 

Vba tip:

Good coding practice

It is important that you always comment the VBA code that you write. By doing this it will make the code much easier to read, as both yourself and other people will be able to see what the code is doing or meant to be doing. This is very important if there is more than one person who writes code in the company as you may have different styles of coding and may not really understand what the other person is trying to do. Also if you write some code and then do not touch it for a year or so you may actually forget what it is meant to be doing. so it is very important to include comments throughout your code and try and make sure that they are as useful as possible

View all VBA hints and tips

forum postHow do you create an action query?

» Forum post: Create action query

hint tipA. First, note ID number of the task you want to link to (predecessor). Then, in the predecessor column of the task you want to link to (successor), type the predecessor task's ID number.
b. The link will be a Finish to Start (the default type).
c. Or y...

» Tip: Predecessor Column Project


Rate this page:
2.2/5 (213 votes cast)
Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses
Microsoft Certified Partner
Security Seal verified by visa, mastercard securecard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Management training

Professional Skills courses
Project Management Course London
Project Management Courses London
Project Management Training London
Project Management Training
Project Seminar
Project Seminars
Time Management Course London
Time Management London
Time Management Courses London
Time Management Training London
Introduction to Finance course
Assertiveness Skills course
Effective Communications Skills training
Presentation Skills London

Training Formats

Public scheduled courses
On-site training
Closed company courses

Consultancy
Application Development

Blogs

Excel Training
MS Project Training
Microsoft Training Blog

Version differences

Office 2010 vs 2007
MS Project version differences

Training Information

London Computer Training
Computer Training London
Docklands Training Courses
Docklands Training London

Training venues London
Client list
FAQ
Pricing and availability
Course details / Syllabus

Training Articles
Training Information

Microsoft training

Microsoft Office training
& IT Applications

Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training
MS Project courses
MS Project training
Outlook courses
PowerPoint courses
PowerPoint training
VBA courses
Word courses
Microsoft.training
(more...)

Excel Training

Excel courses
Excel Training Courses Medway
Autonumber in Excel
Microsoft Excel training
Basic Excel Courses
Basic Excel Course
Basic Excel Training

Interested in MS Access training?

Access courses
Microsoft Access training
Microsoft access courses
Microsoft training access course
Microsoft+access+training
Access courses in london

Training provider

Training providers
IT training companies
IT training providers
Management Training providers
Management Training provider

Event history, feedback results
Events in 2012 · 2011 · 2010 · More

See also

Crystal Reports training