English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I want to automatically add a worksheet tab with the tab description being populated when changing a specific cell. Is there anyway to do this or am I wasting my time?

2007-01-30 09:15:44 · 3 answers · asked by mattymomostl 3 in Computers & Internet Software

3 answers

I believe it can be done.

Assume the specific cell is B5 and the description is "Stuff"...

Dim XLBook as object

If XLBook.activesheet.Range("B" & 5).Value = "Stuff" then
XLBook.Activesheet.Name = "Stuff"
end if

the only part I'm unsure of is "Name"..it could be value or title or text so you'll have to play with that.

hope that helps!

2007-01-30 09:58:02 · answer #1 · answered by rod 6 · 0 1

You do the action as generic yet you record the macro at the same time as you're doing it. when you're pre 2007, as a lot as techniques, Macro, record New macro, supply it a popularity and that i propose shortcut keys then do your inputting and once you've complete click onthe supply up button on the macro toolbar that could have regarded. Then in destiny to run the macro use the shortcut keys you assigned or you may draw a button then proper button of mouse on the button all the way down to assign macro and assign the macro to it so as that in destiny that is in hardship-free words push-button. when you're 2007, change to Developer menu tab and click on recordmacro button in first team of icons on the ribbon.

2016-12-03 06:16:23 · answer #2 · answered by Anonymous · 0 0

It is a way for sure
Do somthing like this

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "A1" Then
Dim Added as Worksheet
Set Added= Worksheets.Add
Added.Name = Target.Value
End If
End Sub

This macro will create a new sheet named the same name as the cell A1 in the actice sheet

Enjoy my profile, I am the VBAXLMan

2007-02-02 21:53:25 · answer #3 · answered by Anonymous · 0 1

fedest.com, questions and answers