activesheet.name

  1. A

    N= activesheet.name

    Hi What is the code change to change 'DataSheet1' to N where n = activesheet.name Original code: Range(Cells(10, 1), Cells(j, 1)).Value = "=IFERROR(INDEX(List!C[1],MATCH('DataSheet1'!RC[4],List!C[1],0),1),0)" This doesnt work: Range(Cells(10, 1), Cells(j, 1)).Value =...
  2. H

    Change code to dynamic range

    Hello, I have this code and I would like it to stop at the last row of the data in each sheet. Option Explicit Sub LoopThroughSheets() Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets ActiveSheet.[d1:d33] = ActiveSheet.Name...
  3. Johnny C

    Odd behaviour of creating a table in VBA

    I'm creating a lot of tables so am using VBA. This doesn't work ... InputName = "Input_" & ActiveSheet.Name ActiveSheet.ListObjects.Add(xlSrcRange, Range("$B$12:$C$38"), , xlYes).Name = Input_Name But this does ... ActiveSheet.ListObjects.Add(xlSrcRange, Range("$B$12:$C$38"), , xlYes).Name =...
  4. V

    VBA - Enter Formula only if Sheet Exists

    Hello, I am trying to write a macro that enters a Vlookup into a cell only if a corresponding tab exists on another workbbok to compare it to. I'm doing this to try to avoid the 'Select Sheet' Dialogue from appearing if there is no corresponding sheet on the other workbook. This is what I...
  5. A

    VBA code to copy ActiveSheet.name to the Clipboard?

    Excel friends, this should be an easy one: What is the code to copy the ActiveSheet.name to the clipboard? So, I can paste it anywhere I want outside the Excel workbook. Any help is appreciated. Thanks!
  6. R

    ActiveWorkbook.ActiveSheet.Name Run-time error 91 / Object variable not set

    I am running the following code on one of my worksheets ("Deal Info" / Sheet3) however for some reason one of the users of this workbook is getting a Run-time error '91': Object variable or With block variable not set message when they open another workbook and this one is open. Here is the...
  7. M

    Creating the same chart different workbook different sheet

    Hi, I have lots of workbooks detailing specific data, I have started creating overview/summary charts detailing specific columns in each workbook. The format of the chart is the same, the columns the data is taken from are the same in each workbook. The two variables are the Workbook Name and...
  8. S

    How to use ActiveSheet.Name in sql query

    Hi Guys, I have a script that is working well i am just trying to make it a little more efficent. The workbook is made of about 10 sheets. Each sheet has the name of business area. I am tring to set the criteria in the sql query to filter against this business area instead of filtering at the...

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