Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

STL - Formerly Best Training Solutions Through Learning
TrustPilot
Excellent
Request Callback We will call you back
0207 987 3777 Call for assistance
Your Basket Basket is empty
vba code

ResolvedVersion 2003

Christina has attended:
Excel Advanced course
Excel VBA Intro Intermediate course

VBA code

Hi there,

I recently had some VBA training, but I am having some difficultly writing a code to wrap the text in cells A1 to K1, this is the code that I have used so far:
Range("A1:K1").Select.Wraptext = True

Also is there an easy way to explain how to get a marco button on the front end saved so that its there everytime you open excel?

Thank you very much!

RE: VBA code

Hello Christina,

The correct code is:
Range("A3:C3").WrapText = True

Also you should have the code written or recorded in the Personal Workbook, then add a button to a toolbar through the Tools/Customize menu.

If you attach a button to the actual sheet then it will only appear on that sheet and workbook.

I hope this resolves your question. If it has, please mark this question as resolved.

If you require further assistance, please reply to this post. Or perhaps you have another Microsoft Office question?

Have a great day.
Regards,

Mark
Microsoft Office Specialist Trainer

Excel tip:

Switching Between Spreadsheets

As the Alt+Tab key switches between loaded applications or files, Ctrl+Tab switches between loaded or open Excel files. Hold down the Ctrl key until you have tabbed to the correct spreadsheet.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.