Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Cory Nelson   on Feb 15 In MS Office Category.

  
Question Answered By: Gloria Cook   on Feb 15

For your sheet  name as a reference  to cell  H11, see the addition I made
to Pascal's code.

A good way to start finding these answers yourself is to look in the
Help file of the VBA Editor. Start reading up on the Object Model, which
will describe that you have Application, Workbooks, Worksheets, Ranges,
Cells, etc.

And for each of these you can set/read properties, do stuff with them
(Methods in the lingo), and also look for event (e.g. clicking a button,
opening a sheet, pressing Enter. These events can be used to trigger
blocks of code  to execute.

Once you understand the basics of the Object model, you can use "F2" in
the VBA Editor to bring up most of the commands. E.g. what can you do
with sheets?
Press "F2", stay in "All Libraries", and search for "sheets" (without
the quotation marks).

This brings up a lot of information. For what you wanted to do, it could
belong in Worksheets, or Worksheet. And in Worksheet, you find the
Property called Name and Names. Which one do you want? Click on each,
and read the explanation. In this case, Names is read only. So not a
good choice.

The correct command would therefore be:
Worksheet.name = Value.

And thus the logic of the code I added.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Add new Sheet and Copy data Or get search suggestion and latest updates.


Tagged: