active sheet

  1. Chris_010101

    Macro to clear filters

    Hello, Sub Reset_Filters() ' ' Reset_Filters Macro ' Resets all filters ' ' ActiveSheet.ShowAllData End Sub If there are no filters applied, I am getting the below error message when the macro is run (it's assigned to a button): And when I debug Kind Regards
  2. Z

    Convert Recorded Macro to Dynamic Values/Ranges

    Hello, I've recorded a Macro that filters a column by color, and then sorts another column in ascending order. I'm trying to make this code more dynamic so I can reuse it elsewhere. I've been playing around with ways to find the active Sheet (ActiveSheet.Name )and active Table...
  3. E

    VBA Hide rows based on two values on another sheet

    Hello, I have a report that produces a spreadsheet where column B has last names and column C has first names. There are many tabs like this and that number of tabs may vary. On a new tab named "Name Filter" I have set up Column A for Last names and a Column B for First names. What I want to...
  4. A

    VBA Save active sheet as new Workbook in specific Location Values only

    Hello i need a macro that will Save the current active sheet as a workbook Any help would be greatly appreciated Requirements: Save active sheet as a workbook Values only Save to specific location E.G. "C:\Users\Username\Desktop" Save the file name as "text" & " " Active sheet name
  5. K

    Open woorkbook -active sheet -next cell

    I have been using the following code to open a workbook to a specific sheet and going to the next available row for data entry. It had been working fine. Then in the course of testing, It stopped working and I would get a "ws = nothing" error... Private Sub Workbook_Open() Dim ws As...
  6. Q

    Different ActiveWorkbook and Different ActiveSheet

    I am writing a macro which is editing data in a different excel file. Let, Excel_with_Macro be the excel file where I am writing the macro Sheet1_EwM be the sheet of excel file Excel_with_Macro Excel_2b_edited be the excel whose data I am editing data_E2bE be the sheet of Excel_2b_Edited and...
  7. S

    Referencing command button from active sheet

    Hello, Need help in the below code. I am calling a command button sub procedure using the loop. When I did it without loop I used Sheet3.CommandButton3_Click and it worked fine. But, then I am doing it using loop then I change it to ActiveSheet.CommandButton3_Click which is throwing error...
  8. D

    print run only when all cells completed

    Hi all I am currently running the code below. However the bottom part runs before I am able to complete filling in the relevant cells so it prints the sheet to quickly. How can I stop this. Private Sub Worksheet_Change(ByVal Target As Range) If Range("C12").Value = "Yes" Then MsgBox...
  9. B

    Select Active Workbook with Userform Code

    Thanks for taking a look at my post. I have a userform with a command button having the following code. Im unsure what code to add to have it work on the active sheet. Thanks again Private Sub CommandButton1_Click() Range("F1") = TextBox1.Text Range("H1") = TextBox2.Text Range("N1") =...
  10. L

    VBA failing when user changes file name

    I have a file where some VBA is ran which creates an output into a new file and does some formatting etc and then the VBA return to the original file where the VBa was first ran from. The issue is the user will sometimes change the file name which creates an error in my code. Please see my code...
  11. S

    Creating new sheet in workbook that is the same as an active sheet

    Hi All, I have a workbook that has a master project worksheet page ("MAIN") that is a summary of all individual projects worksheets. On the main page I want to assign code to a button that will add a new worksheet that is a copy of a template worksheet within the same workbook ("TEMPLATE")...
  12. T

    Getting and activating the sheet name iof a named range

    Hi, When I run my macro, I have to activate the correct sheet before updating the range of the Named Range. Therefore, I thought to activate the relevant sheet of the currently named range. I get an error code. I would appreciate the help. Is there another way to do it? Sub UpdateRange2() Dim...
  13. B

    Change from ActiveSheet to ActiveWorkbook

    I am having some trouble changing the lookup range from the ActiveSheet to the ActiveWorkbook. So instead of the Sub process looking on the active sheet, I am trying to have it look at each different sheet in the workbook. The error I am getting is Rumtime error 1004, No Cells were Found I am...
  14. M

    runtime error 1004 paste method of worksheet class failed

    Hi All! I keep receiving an error when copying data over: "runtime error 1004 paste method worksheet class failed" at ActiveSheet.Range Sheets("Macro").Select Cells.Select Range("A1").Select ActiveSheet.Range Columns("D:D").Select Selection.Insert Shift:=xlToRight...
  15. T

    Copying data from active sheet to another workbook

    I have an active sheet(Sheet2) with the extracted data and a command button, which when clicked should copy the data into another workbook with some conditions applied. For ex- Source file SRC.xlsm has 5 columns and in the 2nd column I need to check for the condition: If the value there is...
  16. A

    I need to change macro ActiveWorkBook or ActiveSheet to only run on Sheet1

    I have a macro that deletes all blank rows in Column A. It seems to only work on the Active workbook or Active sheet, and I would like it to specifically run on Sheet1 regardless of what sheet I am viewing. The name of Sheet1 is "Import" if that matters. Any help would be greatly appreciated -...
  17. bepedicino

    Need VBA Help Making Columns A,B,E,J Uppercase in Specific Sheet

    Could someone please help me by providing VBA code that will make columns A,B,E,J in a specific sheet uppercase?
  18. V

    VBA Code to Copy Active Worksheet into new

    Hello Everyone, I am trying to create a VBA Code to copy an active worksheet into a new work sheet. But I am not able to do so, I have tried different syntax for the same but nothing works. Basically, I got a code from google, that works very well with copying a sheet completely, but can't get...
  19. K

    Possible using VBA to sort a Non-Active Sheet?

    I have a macro tied to a button on a sheet called "Programs". As part of the code of this it sorts a named range "Setting_Employees" on a separate sheet called "Settings". Ideally, to keep the macro from flipping around the active sheets I was hoping to sort a non-selected, non-active sheet...
  20. G

    How to hyperlink a cell in the active worksheet only?

    I have a very large tab within Excel that I want to create hyperlinks saying "click here to go to this section of this tab." The problem I have is that each day, this tab gets copied daily and renamed with the new date, so on the copied tab, the hyperlink takes you back to the older tab because...

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