how do i get the name of a newly added sheet that i add with Sheets.Add in a vba macro in excel?

how do i get the name of a newly added sheet that i add with Sheets.Add in a
vba macro in excel?


0
6/23/2005 6:21:06 PM
excel 39879 articles. 2 followers. Follow

1 Replies
953 Views

Similar Articles

[PageSpeed] 32

Hi Daniel,
See   http://www.mvps.org/dmcritchie/excel/sheets.htm

variable =  ActiveSheet.Name
'Rename current Sheet
    ActiveSheet.Name = "Renamed14a"
    ActiveSheet.Name = "D" & Format(Date, "yyyymmdd")
    ActiveSheet.Name = "D" & Format(Range("a1"), "yyyymmdd")
    ActiveSheet.Name = "D" & Format(Range("a1"), "yyyy_mmdd_hhmm")Also see   http://www.mvps.org/dmcritchie/excel/pathname.htmfor
worksheet solution(s)Since you are familiar with macros you might want to thethe  microsoft.public.excel.programming newsgroup--HTH,
David McRitchie, Microsoft MVP - Excel    [site changed  Nov. 2001]My Excel Pages:
http://www.mvps.org/dmcritchie/excel/excel.htmSearch Page:        http://www.mvps.org/dmcritchie/excel/search.htm "Daniel"
<softwareengineer98037@yahoo.com> wrote...
> how do i get the name of a newly added sheet that i add with Sheets.Add in a
> vba macro in excel?
>
>


0
dmcritchie (2586)
6/23/2005 6:30:16 PM
Reply:

Similar Artilces:

i get error 404 not found when trying to download
I'm trying to download nokia pc suite to windows xp to upload gallery onto the computer but get error message404 not found - how can i download this pc suite please -- Krysy Albutt Krysy Albutt wrote: > I'm trying to download nokia pc suite to windows xp to upload gallery > onto the computer but get error message404 not found - how can i > download this pc suite please Care to enlighten us how this pertains to: - 1) Microsoft 2) Publisher 3) Windows If you're having problems downloading from the *NOKIA* site where do you think you should be directing your ...

How to get Calendar to send me reminders
I have changed my e-mail address but for some reason I cannot get Calendar to send reminders to my new address - I think I have carried out all that is necessary to effect the changover but I am not getting reminders sent. Can anyone help please? Is the Calendar Live ID based and accessible at Calendar.live.com ? -- ....winston ms-mvp mail "Dabardevon" wrote in message = news:FDC2B3B2-EDE4-41B1-BFC4-C0F9ED59CFB9@microsoft.com... I have changed my e-mail address but for some reason I cannot get = Calendar to send reminders to my new address - I think I have...

Some recipients get the attachment, some get winmail.dat
This one has me baffled. We are using Exchange 2000 and Outlook 2000 and have been for 8 months. No previous problems with attachments (.doc, .xls, .jpg). About 2 weeks ago, we started hearing from certain recipients that the attachment wasn't arriving; instead they were getting an unreadable file called winmail.dat. MS says that this is because the sender is using Rich Text to format the email. We have changed the senders to use Plain Text and still have the same problem. If the email is sent to several recipients, some will get the attachment fine, some will not. This didn'...

How to get the CScrollBar's Handle in CTreeCtrl?
Hey,All: I thought I have a problem when I trid to get the CScrollBar's handle from my CTreeCtrl extended handle. Can anybody tell me whether I can get the handle of the CScrollBar from the CTreeCtrl? Thanks in advance! Carl :-| Carl wrote: > Hey,All: > > I thought I have a problem when I trid to get the CScrollBar's handle from > my CTreeCtrl extended handle. > Can anybody tell me whether I can get the handle of the CScrollBar from the > CTreeCtrl? > > Thanks in advance! > Carl > :-| > > Sorry, it is not that simple. The scroll bars that...

Adding Junk Senders in 2003
I know how to add names to the junk senders list one at a time. Is there away to mass add names? I had over 20 names and didn't want to add the names one by one. Is there a script to add several at once? ...

A Crystal Beginner
I am using Crystal 9.2.4.77 and have loaded the Crystal enhancements. Now I want to do against the CRM database. What do I do? I thought I would create a data source to the CRM SQLserver, which I did, then connect to it through Crystal Reports. That works, but when I drill down on the AAA_MSCRM database to choose my tables, it shows me dbo as the only option (where did this come from??) and under that are just a few generic tables. No CRM tables. Something's not quite right. What am I missing? file - log on to aps server "KBLawson" <klawson@aetinc.com> wrote in ...

Install driver files with the same name
Hello, We have multiple driver files with the same name which were provided third party. I am looking for a way to install the drivers. Because We want that the each driver are used in different applications. Is there any way to install the drivers without changing their file sames? Taka <Taka@discussions.microsoft.com> wrote: > >We have multiple driver files with the same name which were provided third >party. >I am looking for a way to install the drivers. >Because We want that the each driver are used in different applications. > >Is there ...

Importing/parsing data from an external file in Word 2007 Macros
Hello! I am wondering if this is possible, and if so, how do I do it? What I want to do is this: I have a template, and I want to write a macro that will create a document based on this template by pulling data out of other files, formatting the data, and putting it in the appropriate section of the document. I have no experience with Word Macros or VBA, although I have programmed in VB.NET in the past. Any suggestions would be helpful! Thank you! Kaiti You would need an AutoNew macro in the template that contained the code statements. Sub AutoNew() ActiveDocu...

Adding a digit
I have a long list of product codes e.g. 230956743, 485048675. But i want to put a zero in front of each one e.g. 0230956743, 0485048675. Is there a quick way of doing this. Obviously the column will have to be formatted as text because otherwise the zero would dissapear. Chris -- cj21 ------------------------------------------------------------------------ cj21's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=25673 View this thread: http://www.excelforum.com/showthread.php?threadid=480811 see response in .Excel Format>Cells>Number>C...

file is locked does not appear in Excel if file already open by an
We have shared files on a network drive. When a file is open by one user, and a second user opens the file we want them to recieve <filename> is locked for editing message and open the file read only. This works great for some users, but we have several users that can open the file (even if someone is already in it) and they do not get the prompt and can edit the workbook. Is there a setting that would turn this off for some users and not others in excel? Hello Leslie, You could try sharing the workbook. With the Excel workbook open, choose Tools from the menu. Choose Share W...

Cannot get fast forward or fast reverse to work with WMP 11
I am running Vista Home Premium on a HP G 217-EM Notebook which comes pre-installed with Windows Media Player 11. When I play cds and try to fast forward or fast reverse by keeping the fast forward or fast reverse buttons constantly depressed nothing happens. Why is this, and can anyone come up with a solution? Many thanks This doesn't work on my system either, so it's probably just a limitation of WMP. Fast forward and fast reverse should work fine when you rip the CD's to MP3 or WMA files, and play these files instead. Regards -- Tim De Baets http://www....

Get paid while you get online!!
I found a great Internet company - Cashfiesta.com - that has created a product everyone can benefit from. They pay you while you work or play on your computer. All you need to do is keep their software - the FiestaBar=99 - active while you are online. They even pay you when your friends are using their computers. Unlike other companies, Cashfiesta gives you control over how much money you earn. They have an individual payrate based on the number of Special Offers you sign up for. As some of these offers are free, you can increase your payrate up to 33 times without spending a penny. It's...

How to program an excel macro to repeat a series of keystrokes?
I want to program an Excel macro to set a columnar range, then perform the keystroke series "F2, Home, =, Enter" repeatedly until the end of the range is reached. How do I teach the macro to automatically repeat the keystoke series? I am using XP, and Excel 2002 10.4. Thanks for your help!!! Hi there, Look up Sendkeys in the visual basic editor help. Hope that helps Naz, London "Beancounter" wrote: > I want to program an Excel macro to set a columnar range, then perform the > keystroke series "F2, Home, =, Enter" repeatedly until the end of the ...

Can't get auto-update (update) to install
Version: 2008 Operating System: Mac OS X 10.4 (Tiger) Processor: Power PC I've been trying to manually check for updates to Word 2008, and I get a &quot;critical update&quot; notice, asking me to install auto-update. When I try to install it, I cannot. It just keeps repeating the attempt, in an &quot;endless loop.&quot; What to do? <br> Thank you. ...

Spreadsheet getting corrupted
Hello All: I have a relatively large spreadsheet. I am getting errors (see after my signature line). What could be causing these errors? Is it that the spreadsheet is too large? Thanks Deguza -------------------------------------------------------- Microsoft Office Excel File Repair Log Errors were detected in file 'C:\Documents and Settings\deguza\My Documents\sales\Sales_2006_2007.xls' The following is a list of repairs: Global PivotTable report information was repaired due to integrity problems. Global PivotTable report information was repaired due to integrity problems. Glo...

Change Excel Icon
Is there any way that the Excel Icon can be changed (without creating a shotcut) but still open as an excel application when clicked? Many Thanks. Kevin. Right click the icon, go to properties, select Change Icon. "kevin" <kevin@discussions.microsoft.com> wrote in message news:BD3D14AE-46DA-4D03-944F-B04BF1DA0D8C@microsoft.com... > Is there any way that the Excel Icon can be changed (without creating a > shotcut) but still open as an excel application when clicked? > > Many Thanks. > > Kevin. Kevin AFAIK you cannot change the icon for the Excel.exe...

Footers/Headers in Excel
Can I paste from Word to a custom header or footer in Excel? Yes. Select what you want in Word and copy. Go to custom header spot. You need to click in there and hit ctrl;v There's no command to actually paste (like right clicking). ctrl;c = copy ctrl;v = paste "sls" wrote: > Can I paste from Word to a custom header or footer in Excel? ...

Checking specific text string in excel files stored in a folder
Hi, I need to write a code that can do the following: 1) prompt user to select a particular folder 2) search for a particular text string, for e.g., ABCD in all the excel files in that folder (the number of files in the folder will vary and so does the names of the files). Is it possible to specify the string that we want to search on the fly when macro is run? 3) create a simple report that contains the filename in one column and yes / no in the second column that tell me which file names contain that keyword (it will be great if the path of the file can be recorded in the 3rd colum...

Reg getting the next IV Document Number field !
Hi, I am creating a window in dexterity similar to the item transaction entry window (Transactions>Inventory> Transaction Entry). In the Item transaction Entry window, the Document number field defaults to the next document number when we move the focus to that field. I wanted to know if there is any function , or table that i can access to get the next document number in the new window that i am creating. Thanks, swetha -- swetha >In the Item transaction Entry window, the Document number field defaults to the next document number when we move the focus to that field.< T...

referencing a cell determined by name in another cell
How do I reference a cell within a formula based on the contents of another cell? For example if one cell contained a reference/address for a column array, how could I refer to this cell (and hence the column array) within the vlookup function instead of having to put in the actual table array. In other words an external way of changing the table array rather than going into the formula. VLOOKUP(lookup_value,table_array,col_index_num,range_lookup) Hi use INDIRECT for this -- Regards Frank Kabel Frankfurt, Germany "ricardo wants answers" <ricardo wants answers@discussion...

No mapping between account names and security IDs was done. 11-10-05
"No mapping between account names and security IDs was done. SOAP Server Application Faulted" Removed licenses from other users that are no longer here. I cannot add the new users. any ideas what the error messages mean? ...

Get notified when Out of Office is on
I am using Outlook 2007. With 2003, when returning from leave, I used to get a notification that the Outlook out of office was still on and asking me if I wanted to switch it off. This reminder no longer appears with 2007. How can I switch this setting on so that I get the notification? "Mary Ann" <MaryAnn@discussions.microsoft.com> wrote in message news:ED5533A7-D0EA-41B8-B1A0-A9D15FB6FD98@microsoft.com... >I am using Outlook 2007. With 2003, when returning from leave, I used to get > a notification that the Outlook out of office was still on and asking me ...

CRM 3.0 Upgraded Failed, AD Groups gone
I was upgrading to 3.0 (w2k3 sp1 and SQL 2005 on same machine, Exchange 2003 sp1) and it failed with the following error: ************ Action Microsoft.Crm.Setup.Server.InstallDatabaseAction failed. Login 'distributor_admin' owns one or more database(s). Change the owner of the database(s) before dropping the login. Changed database context to 'master'. Changed database context to 'NorthAmerica_MSCRM'. ************ After rebooting, the Repair option fails with "One or more Microsoft CRM groups were not specified". The help reveals the following solution: ...

How do I get??
Sorry if this seems a fairly easy question to you guys. I have a spreadsheet and I need to get the current system time into a cell. The format of the time is hh:mm am/pm. Any assistance would be most helpful. Hi try =INT(NOW()) in this cell and format is to your needs -- Regards Frank Kabel Frankfurt, Germany PM wrote: > Sorry if this seems a fairly easy question to you guys. > > I have a spreadsheet and I need to get the current system time into a > cell. The format of the time is hh:mm am/pm. > > Any assistance would be most helpful. PM, in the cell you want pu...

What's "can't shift items off sheet" in Excel?
I have a rather large Excel file (I'm adding items to the "G" columns. I have several columns hidden (old data I want to keep) and only about 8 or 10 columns unhidden. When I tried to hide three more columns just now, I get an Excel message "can't shift items off sheet". What does this mean? I've been using Excel for 11 years, and have never seen this message. http://support.microsoft.com/?id=170081 XL97: "Cannot Shift Objects Off Sheet" Error Hiding Columns http://support.microsoft.com/?id=211769 XL2000: "Cannot Shift Objects Off Sheet&...