activesheet.name

  1. cpg84

    Tab name change issue

    Hi All, As a follow on from my previous post a few weeks ago, this is the code I have at the moment. It works perfectly when I change the value in cell G7. What I didn't account for was when you clear the contents of G7. I want to be able to either have the tab name to stay as it was...
  2. F

    ActiveSheet.Name into .RefersToR1C1 not working

    Hello i'm new to MrExcel.com I have some issues with the following code below. I tried to make a link to the sheet name into the offset property It gives me an error: Option Explicit Sub Magazijnprint() ' ' PrintBereikBepalen Macro ' PrintBereikBepalen ' ' 'Productie Print...
  3. T

    For without Next

    Hello, I have a custom tab from UI Editor. I keep getting 'For without Next' error and it highlights the End Sub. Have no idea why. Please help! Sub DC_Split(Optional ByVal Control As IRibbonControl) Application.Calculation = xlCalculationManual Application.EnableEvents = False...
  4. gheyman

    Worksheet Deactivate

    I want to automnatically rename the tab based on whats in cell B8. Help Please. Private Sub Worksheet_Activate() 'ActiveSheet.Name = Range("B8") End Sub
  5. Ironman

    Run code only if activesheet.name is Sheet 1 or Sheet 2

    Hi I have the following code: If ActiveSheet.Name <> "Training Log" Then Exit Sub I'm trying to amend this so that the code will also run if the active sheet is called "Analysis" (without the commas) I've tried If ActiveSheet.Name <> "Training Log" or "Analysis" Then Exit Sub but this errors...
  6. H

    creating lists to choose from referencing cell ranges in VBA?

    Good day all, I was wondering if it is possible to create a list to choose from in a pop up box references another sheet. For example... this is my current script below and it basically copy's another sheet from a closed workbook in my drive and renames in based on a certain cell range. What...
  7. M

    Dynamic use of union function

    I have a routine that asks for non contiguous columns them copies those columns to a new work sheet. The problem I have run into is that the number of columns are not always the same. I have been using a user form that allows selection of cells that allow the column numbers to be passed to the...
  8. F

    Use cell value as new worksheet's name

    Hi, I am new to VBA. I would like to name the sheet in new workbook as Range("B2"). However, Range("B2") refers back to the B2 in original sheet instead of the new worksheet. The problem is when I apply filter for column B in original sheet and copy data to new worksheet, for example, the...
  9. A

    Sequential Sheets Issue

    Hi Guys. I have workbook that has numbered sheets in the format 001|002|003 etc... I am trying write some VBA to duplicate the last sheet, formulas included, and continue the numbering of the sheets in the same format. For example, the user has 30 sheets (001 - 030) and adds a new sheet. the...
  10. A

    ActiveSheet.Name not working for some users

    Hi everyone, I have a report that updates data when the dates are changed either in field C2 (from) or field F2 (to). It goes like this: Private Sub Worksheet_Change(ByVal Target As Range) Dim TValue As String, TAddress As String, Tsource As String If Target.Address = "$C$2" Or Target.Address...
  11. F

    VBA Still Running

    I have a userform in a workbook A that I can click on a button to open another workbook (B). When I am done editing Workbook B, I want to save and close. Excel will not let me until I close the userform in Workbook A. I want to leave the userform open as I will need it to do other things and has...
  12. S

    vba run a macro from another workbook

    Hi. I've been looking for a solution for at least an hour. I have this code: Private Sub EXPORTER_Click() If ActiveSheet.Name = "MODULES" Then Application.Run ActiveWorkbook.Name & "!QUESTION_EXPORTER_VERS_TECHNIQUE_MODULE" ElseIf ActiveSheet.Name = "ACCESSOIRES" Then...
  13. C

    Copying a Sheet with a New Name as Values Only

    So this is the code that I am using. Sub SaveCount() Dim sName As String Dim i As Integer i = ActiveWorkbook.Worksheets.Count sName = Application.InputBox("Enter a name for the new sheet", "Add sheet") If sName = "" Then Exit Sub Worksheets(2).Copy after:=Worksheets(i) ActiveSheet.Name =...
  14. E

    Active sheet name to change in sequence by macro

    Hi there, I've got a workbook with two spreadsheets named "WT-1" and "CL-1" (it could be more of them with diff. names). When i.e. "WT-1" is active, I would like to be able to (by using a button with macro assigned to it) copy this current (active) spreadsheet and rename it in sequence like...
  15. D

    vba error when copy/paste without clipboard

    Hello all - I'm receiving a "missing object" error in the below code. This is only a smidgen of much a much larger code which copies 100 text files into 100 worksheets. The range in File2 may vary, but will never be larger than A1:R55. Any assistance in having this copy/paste without...
  16. D

    vba efficiency with copy/paste

    Greetings all, I have a large spreadsheet which copies 100 text files into 100 worksheets, then embeds the compiled data into an email which sends every 30 minutes via a scheduled task. Each time the vba runs I have to stop what I'm doing due to the clipboard being tied up until after the file...
  17. N

    VBA printing on one page issue

    In the following code I have 'FitToPagesWide' and tall = 1, but when run, it still shows up on two pages. What am I missing here? Much thanks for any help. Sheets("Original").Select Do Until ActiveSheet.Name = "zzz" ActiveSheet.Next.Select RowNum =...
  18. O

    Simplify the code, write everything in less than 20 lines

    Hi Everyone, i was wondering if this code Range("A1").EntireRow.Copy Sheets.Add After:=ActiveSheet ActiveSheet.Name = "Pending" ActiveSheet.Paste Cells.EntireColumn.AutoFit Sheets.Add After:=ActiveSheet ActiveSheet.Name = "Closed" Worksheets("Sursa").Select Rows("1:1").Select...
  19. S

    Object Required Error in VBA,

    Sub Split() Dim wb As String Dim ws As String wb = ActiveWorkbook.Name ws = ActiveSheet.Name Vcolumn = InputBox("Please indicate which column (i.e. A,B,C,...), you would like to split by", "Column selection") Columns(Vcolumn).Copy Sheets.Add ActiveSheet.Name = "_Summary"...
  20. J

    Trouble creating pivot table in VBA

    All, I've searched for the answer to my question and haven't found much help. I was hoping someone could point out where I'm missing something as the below coding fails at the last line and never creates a pivot table. 'Create pivot tables Dim pvtCache As PivotCache Dim pvt As PivotTable Dim...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top