Thread: Text Box
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Alan Alan is offline
external usenet poster
 
Posts: 138
Default Text Box


Skydiver wrote:
Can you carefully walk me through this?


If you've never written a macro before the easiest way forward is to
use record.

Build your spreadsheet with a text box visible but make sure that it
isn't selected - have cell A1 selected or something - and then select
<Tools<Macro<Record New Macro from the menu. A box will appear that
enables you to 1. Name your macro (but no spaces are allowed) 2. Define
a short-cut key (Say Ctrl+z) to initiate the macro 3. Define where the
macro should be stored (within the existing workbook is probably the
best for you) and 4. A description of what the macro does if you feel
this is necessary. Click OK and a stop button should appear on your
screen for use at the end of the recording process.

Now enter the exact keystrokes or mouse clicks that you want the macro
to perform - in this case 1. select a cell that is very close to the
top LH corner of your text box and then 2. perform a single mouse click
within the text box - now click the stop button and your macro is
available for use by pressing Ctrl+z - from anywhere on that worksheet
just press Ctrl+z and type.

If you want to be able to do all of the above when you are starting on
a different sheet just begin your recording from a point on a different
sheet and the first step in the operation will be to select the correct
worksheet sheet prior to selecting a cell and clicking in the text box.

The macro you have recorded can be viewed or modified in the VBA editor
but without a basic understanding of VBA you may not wish to go there.

Cheers!