macros

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Macros

Macros

resolvedResolved · Low Priority · Version 2010

James has attended:
Excel Advanced course
Visio Introduction course

Macros

Hi,

I was wondering if it's possible to type text while recording a macro so that a column title, for instance, can be renamed when the macro's run?

I have tried and each time I move away from the cell I've typed in while a macro's recording Excel just crashes.

RE: Macros

Hi James,

Thank you for your post. Does Excel crash each time you record any macro or just this particular one? Do you turn on "Use relative references" when recording a macro? I've tried recording a similar macro on my computer and it seems to work. Just trying to work out whether it is a macro-related issue or a different problem.

Kind regards
Marius Barnard
Excel Trainer

RE: Macros

The macro records fine as long as I don't physically type the column header while it's recording. Other macros also record and function fine (although they don't include any typing).

I hadn't tried using the "relative references" option however. The macro is essentially formatting a report and I wanted to always add 2 additional columns at the end, the report should always be the same size so I assumed the relative references option wouldn't apply.

I didn't want to add the text relative to the selected cell but simply in the same cell each time the macro is run.


 

Excel tip:

Shortcuts for working with named ranges in Excel

If you are working with or creating named ranges in your spreadsheets, then you may find the following shortcut keys useful.

- Bring up the Define Names dialogue box on screen by using Ctrl + F3 (instead of going to Insert - Names).

- Create Names from labels you have entered into the spreadsheet by highlighting the labels and related figures, then hold down Shift + Ctrl + F3. You can then choose to create names from the top or bottom rows, or left or right columns.

- Go directly to a named range by hitting the F5 key. The Go To dialogue box will open and display any named ranges in the spreadsheet. Simply select the named range to navigate to it in the spreadsheet.

View all Excel hints and tips


Server loaded in 0.08 secs.