activesheet

  1. D

    XPS File Save

    Hi, I'm trying to prevent xps overwrite on save. I can't get anything to work. I'd prefer to use a variable value to individualize each save. Is it even possible? With ActiveSheet .ExportAsFixedFormat _ Type:=xlTypeXPS, _...
  2. N

    Require Correct Syntax using .Formula = "=Substitiute...." between two sheets

    Hi Can anyone help me with correct syntax for the following ActiveSheet.Range("B1").Formula = "=SUBSTITUTE(A1,TRIM(RIGHT(SUBSTITUTE(A1,""."",REPT("" "",255)),255)),TRIM(RIGHT(SUBSTITUTE(A1,""."",REPT("" "",255)),255))+1)" Instead of using ActiveSheet. Range would like to use Sheet1 and...
  3. Z

    How to select specific CheckBox's?

    I'm using a lot of checkbox's on a sheet and I would like to 'Select All' for only some of them. Currently I have a code that uses a checkbox to select all and deselect all. Here is the code I'm using: Private Sub CheckBox17_Click() Dim ws As Worksheet Dim oj As OLEObject Set...
  4. V

    Looping help to skip blank rows vba

    I am moving data from a source sheet to my activesheet. When I do, any blank rows on my source sheet are copying over as well. I do not want this. I want on my activesheet for all the data to be compacted together. How do I do this--what am I missing in my code below? Sub SkipBlankRows Dim...
  5. F

    Import csv-file

    hi! My code aims to import a csv file and make certain modifications, but I keep getting a 'Sub or Function not Defined'-error. Any ideas why? Sub allofit() Dim ws As Worksheet, strFile As String ActiveWorkbook.Sheets.Add After:=Worksheets(Sheets(2)) Set ActiveSheet = ws strFile =...
  6. M

    Make Second Sheet from left Activesheet (ordinal position #2)

    Hi, I do not know if this is super easy or challenging, but I am trying in set my active worksheet to be the second sheet from the left. When my workbook opens, a form prompts you for a username/password which allows certain sheets to become visible depending on what you put in. I want to...
  7. J

    xldown not working Error: object vairable or with block variable not set

    Hello, So here is the setup. I have around 80 sets of data. Each data set is contained in its own tab. I would like to plot all of each data set and then two specific parts of the data set on one smooth continuous no marker scatter plot. The data sets vary in length and so do the partial...
  8. M

    VBA code error when using File Exit

    Hi In Excel 2010, under a Workbook_BeforeClose event, I have code to deselect any multiple selection of sheets. Private Sub Workbook_BeforeClose(Cancel As Boolean) ActiveSheet.Select 'removes multiple selection of sheets End Sub This works fine, when closing an individual spreadsheet...
  9. H

    Link Pivot Table Collapse/Expand to worksheet rows

    Hello. First time post, long time user of this sites great ideas. Problem Set: I have (1) Work Sheet that has (4) columns, (140) Rows. Columns: Item 1, Item 2, Item 3, Item 4. > Created a Pivot Table in another Work Sheet that has these columns in a hierarchy in column A. I would like to (via...
  10. I

    Why is it necessary to specify activesheet for chartobjects.add

    Sub smarterway() Dim chartfirst As ChartObject Dim rngChart As Range Set rngChart = Range("D3:J20") Set chartfirst = ActiveSheet.ChartObjects.Add(Left:=rngChart.Left, Top:=rngChart.Top, Width:=rngChart.Width, Height:=rngChart.Height) [....] For this...
  11. A

    Macro Works One Way But Not Other - Why?

    The macro is to change all formulas into values: When I run it, I get the error message if I type as it is in book, that is, with "with ActiveSheet" on same line. However, if I have it on separate line, it works. Why is that? Compile Error Syntax Error with the Dim line highlighted. Macro...
  12. E

    Cnage VBA code to select filename

    I have the below VBA code running. However the filename SCORESHEET always changes as my staff’s are required to save the worksheet once they opened it. The macro in this sheet is activated via command button. They will save the filename something like this STAFF NAME-KPI-DDMMYY (e.g...
  13. L

    Sort columns using variables

    Hello there, I need to sort by multiple columns in a worksheet where the worksheet name, column locations and used range will change every time. I have the below code but it's not sorting so I know that I've missed something.... I think it might be the range variables that I set and then use as...
  14. 8

    Select All charts in active sheet

    I feel like this should be incredibly straightforward but it's evading me for whatever reason, and i'm getting irritated. I just want a simple one liner that will select all of the charts on the active sheet without having to concern myself with chart names, or grouping. Something functionally...
  15. S

    Checkbox copy

    Hi Everyone, I am new to VBA and Excel. I am trying to do something like this with a macro: In a sheet there are 4 headers (cells with colored title). Under each header, there are multiple checkboxes. I want to copy only the checked Checkboxes and paste them into a new sheet under the same...
  16. G

    Copy ActiveSheet Name

    Hi, I am hoping to copy the sheet name of the active sheet. Which will then be pasted into a specific cell of my choice. Is this possible?
  17. E

    How to use VBA function in formula Bar?

    Hello all, This is my first post here. I've searched the entire forum but couldn't find an answer for my situation. This is what I am trying to do; My sheet names are the dates of the month.. 07 Feb,08 Feb,09 Feb etc.. I want to sum up the values in a cell(for example L41) in every sheet from...
  18. S

    Accessing name property of ActiveWorksheet

    Hi All Possibly a very simple question. In VB when I select a worksheet, I can amend the (Name) of the worksheet in the properties window. There is also the .Name property which is the same as the sheet tag name. I can use the (Name) in vb code to identify the sheet e.g...
  19. D

    change activesheet in a for loop

    Hi All, I have an array that contains a list of worksheet names. I want to change the activesheet in a loop. psuedo-code: array = ("sheet1" "sheet2" "sheet3") for i = 1 to length of array change active sheet to array(i) ... rest of macro ... next j I've tried a number of (what I thought...
  20. B

    ActiveSheet.ShowAllData failing- 1004

    ActiveSheet.ShowAllData failing - 1004 the worksheet ("TPRs").activate line is right before and seems to work because I can see the activesheet object in watch window. the TPRs worksheet has 1 list object and 1 pivottable whose cache is the list the listobject on the same worksheet. 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