vba code

TrustPilot

starstarstarstarstar Excellent

  • Home
  • Courses
  • Promotions
  • Schedule
  • Formats
  • Our Clients

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » VBA code

VBA code

resolvedResolved · Urgent Priority · Version 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:

Excel 2010 Shortcuts - Start and End of the Worksheet

Did you know you can quickly move to either the beginning or the end of an Excel Worksheet using just a couple of keys on the keyboard?

Press Ctrl + Home key to move the cursor to cell A1

Press Ctrl + End key to move the cursor to the end of the current worksheet.

View all Excel hints and tips


Server loaded in 0.07 secs.