I see how to add a tab for a macro with a date stamp but I have not been able to figure out how to also add a label to it as well. As an example I would like to be able to create a tab that says Dec-2016 Journal or Dec-2016 Log
How do I add a tab using vba in excel that has both a name i specify and a date stamp
230 views Asked by H Jennings At
2
There are 2 answers
0
KyloRen
On
Try this, This will add the sheet and name it with a date log. I have put in more info on the date, as it could cause a conflict with same names for the sheet by making a new sheet in the same month
sName = "My Sheet"
With ThisWorkbook
.Sheets.Add(After:=.Sheets(.Sheets.Count)).Name = _
sName & " " & Format(Now(), "mmm-yyyy hh-mm-ss")
End With
You can change the formatting to suit your needs. And if you don't need hours , minutes and seconds, just remove that from the formatting code.
Related Questions in VBA
- Toggle "conversation view" in Outlook with VBA
- VBA query - sort text in alphabetical order in Word
- Excel - Visual Basic, macro with autofill "1"
- Getting Run-time error '13': Type Mismatch using .Find
- Getting website metadata (Excel VBA/Python)
- How to use VBA to bold just some text
- VBA Code to filter and get values from csv to excel worksheet
- Azure Batch for Excel VBA
- How can i printpreview multiple excel sheets, with the names of the sheets located in a range?
- Comparison the data of two row and unique number highlight and show below of it
- Is there a way to pass Today's date as a command line argument to Excel from a Windows Task Scheduler Job
- Xero Upload Invoice file using API
- Visual Basic For Application Related Question
- Trying to give color to column field headers in pivot table with vba
- General error handler: If any error in UserForm other than msgBox: Err.Description
Related Questions in TABS
- Visual Studio 2022 convert spaces to tabs on checkout and back to spaces on checkin
- How to get new text input after entering a password in a tab?
- I need assistance with scripting between tabs for Google Sheets
- Removing tabPanel(s) with same title in shiny
- I want change the color of TabRow to black using indicatorColor = Color.Black, but in material3 indicatorColor not exist anymore
- Change background on Tab react native app
- User non Administer System on Apache Guacamole can access history tab?
- Chrome Extension: Uncaught SyntaxError: Unexpected reserved word
- Switching between tabs Ant Design Vue
- Automatically log the user out when the browser or tab closes
- create new workbook from excel tab and save to new location and close it and then grab the next tab and save to a different location using VBA
- Make the Reviews Tab Active on Elementor Product Data Tabs
- Blazor Web App: How to correctly open razor pages from referenced projects in new tabs?
- Visual Studio 2022 Community: Tab Spacing Off (Extra Indent?)
- How to create a pivot table that pulls data from multiple tabs?
Related Questions in RENAMING
- How to remove numbers from all column names / headers in a dataframe
- How to remove a reoccuring word/character and what comes after, from the filenames of multiple files?
- How do I rename files in a folder based on specific content in each file using PowerShell?
- Kotlin class rename with upperCase gives me redeclaration error
- Replace string in all files recursevely
- How do I rename files found with the find command
- How to rename multiple objects in r? Or how objects can be recognised with "-" in their name in r?
- subsetting and renaming vector elements
- Is it possible to dynamically assign variable names to a vector in a magrittr pipeline?
- REGEX - How to find two hyphens in a filename?
- Renaming list of Google Image URLs and saving in new folder
- Renaming files in a numerical sequence + letters
- SQL Server refactoring technique for renaming tables and renaming views
- Rename folders based off of newest pdf in folder
- Renaming / Restructuring the layout of file names in a directory
Related Questions in DATESTAMP
- How put in unique format date with different format dates in one column?
- How to place output from the Notepad++ Run command to the current file's cursor position?
- Using DISTINCT ON for a column of type timestamp to extract the most recent value for each day
- In C, reading a date stamp string from the keyboard
- How do I download this file to a folder with the current day's date stamp?
- How I insert a time-date-stamp in MongoDB with a Golang Sruct?
- Convet W(Number)-Y(NUMBER) to date in Python
- indexing by windows with step gap over a pandas DF
- how to create a directory with datestamp as its filename in jenkins pipeline?
- How do I split this datestamp in Google Sheets
- Checking if there already is a sub-folder bearing date in its name before attempting to create a newer version of it - using BAT script
- Grok pattern for [Mon Jan 04 08:36:12 2021]
- Walking directory tree and appending datestamps to file names
- Printing row based on datestamp condition of another column
- How do i pull data between current date and current date + 2 but exclude weekends?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Use this as a starting base
Do you need it to be self-allocating with respect to date/name etc?