xlthin

  1. M

    VBA code to select multiple pivot tables

    Hi all. I'm hoping somebody can help please. I've recorded a macro for one of my pivot tables, but I would like this recording to be applied to 3 other pivot tables in the same sheet. At the moment, my code only references a range (A1:J14) and not the pivot table (PivotTable5) - can anybody...
  2. I

    Argument not optional message

    Hi, Please could you advisethe issue with my UCase code Private Sub InsertNewRow_Click()Rows("6:6").Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Range("A6").Select Range("A6:Q6").Borders.LineStyle = xlContinuous Range("A6:Q6").Borders.Weight = xlThin...
  3. G

    Select a range plus 1 cell.

    Hi All, Hopefully a very simple question. I have a part of a larger macro that selects a range and then draws a box around it. I would like to extend the range that the box is drawn around by one cell at the bottom. I've fiddled with it unsuccessfully. Code below. Thanks for your help...
  4. J

    Borders of text boxes and cells

    I'm trying to create text boxes with the same border width as the worksheet cells (set in VBA). My VBA code sets Selection.Borders(xlEdgeTop).Weight = xlThin Units for text box border width in format shape/line/weights & arrows = ??pts I'd like to set the borders of my textbox to the points...
  5. S

    Workbook Sheet_Change Loop

    I have a worksheet_Change item that is supposed to insert a timestamp (upper piece of code) and change two cells (R6 on one sheet, R9 on the rest) based on the value of another cell/sheet. Well here's the issue- this seems to be looping so, for example, the one piece of code continually...
  6. S

    Workbook Sheet_Change Producing Error

    So I the code below should input a timestamp in cell F4 on the sheets within the workbook (except those 3 excluded in the beginning). Well running the sheet, I'm getting an error and it highlights the line in red below. Ideas? Originally "F4" on the activesheet was locked and I set it to be an...
  7. S

    Conditional Formatting to the Pivot Field instead of Selecting Cells

    I'm trying to apply a formatting condition to a pivot field, the script below does that but applies Formatting to "Selected Cells" of the Pivot Filed and makes it a static cells range, instead of Pivot Field Values of the pivot table, where as the same can be done manually. <code style="margin...
  8. S

    Fomratting Subtotals Rows

    I am trying to format subtotal rows ( which are in column f) with a loop and I am doing something wrong. I want the macro to outline and fill in colour for the subtotal row (Columns A to P): ''Define last row in worksheet using column F Dim Previous As Worksheet Set Previous =...
  9. O

    Using LastRow and Borders

    First off, thanks for the help. I am using LastRow to find the last row of data in my spreadsheet. The last row in my spreadsheet varies daily. Dim LastRow As Long Range("A1").Select LastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row Then I am...
  10. jo15765

    VBA To Add Borders

    Greetings - this works, but is more of an optimization question. I am wanting to add borders (all) around my selected range. Is there a shorter way to write this code? This is what the Macro Recorder created Range("A1:" & colName & lRow).Select Selection.Borders(xlDiagonalDown).LineStyle...
  11. L

    VBA code so that after each page break, Excel adds a line when printing

    Hi all, I got a Excel file that contains all my reports that are on the same tab one after the other. Each report has his own personalize print layout (different paper size, some are on one page, others are separated on two pages, etc.) Some report became so big after some time, that I need...
  12. I

    Border style advice please

    Hi, I currently have the code below in use. Private Sub CommandButton1_Click()Dim CustomerName As String Worksheets("DATABASE").Select CustomerName = Range("A6") Worksheets("INFO").Select Worksheets("INFO").Range("CF2:CI2").Select If Worksheets("INFO").Range("CF2").Offset(1, 0) <> "" Then...
  13. B

    Be able to REDO after macro runs if needed

    I have the code below that i was hoping that there could be something modified so I could hit undo if the rows were not added at the correct place. Sub Insert4() Range(ActiveCell, ActiveCell.Offset(3, 14)).Select Selection.EntireRow.Insert For n = 7 To 10...
  14. R

    Auto Format Dynamic Range on Dynamic Sheets on Workbook Open

    I'm trying to auto format the data in a dynamic range, on a dynamic count of sheets, when the workbook opens. Essentially, every sheet not named "Variables" or "Financials" where there is data in any sequential row. I'm using this code, but it's not hitting all of the sheets. What am I...
  15. I

    VBA version of =TODAY()

    Hi, I am using this code below but i would like to also add the current date when its run. +TODAY() isnt correct so please can you advise how its done. Private Sub Imageline_Click()Rows("6:6").Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Range("A6").Select...
  16. Trevor3007

    subroutine

    In the 'red'code below , if the user chooses N, I need it to go to the 'green' code bit at the bottom just before the 'exit' so the cursor ends up in cell A2 & a msgbox dispalys to prompt the user with a message of advise. It works fine if Y is chosen? Sub importdata() ' ' importdata Macro...
  17. dreid1011

    For loop and stuffing was working, now it is misbehaving.

    Good morning, I have some code that, up until I made some adjustments, was working mostly as intended. I have a daily sheet which, when opened, opens a userform for my coworkers to input daily cash, checks etc. After inputting their data, they click a submit button, which transfers the data...

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