activeworkbook

  1. A

    Using same Recorded Macro to work on active Sheet - Slicers

    Hello All, I have tried to search on the site looking for a way to use a record macro on any sheet within a workbook. I currently select the slicers and it will work on the original sheet created, but not one the active sheet. Sub Yonick() With ActiveWorkbook.SlicerCaches("Slicer_GSM")...
  2. G

    VBA to find specific text and copy below it

    Good Afternoon, I've got the following code below and instead of doing A1:L500 on the Copy/Paste, I want it to look for the cell that has this "#############REPORT OUTPUT#############" and then copy every cell below it between Columns A:M How would I go about that? Sub DailyRatesWkday()...
  3. G

    VBA to Import CVS Files

    Good Morning, I've got the code below -- I was hoping just adding CVS to the filter would allow me to import it but it doesn't so I need to help. How can I get this code to import CVS files? Sub ActiveRateCategory() Sheets("ActvRateCat SumRpt").Range("A:M").Clear Dim wkbCrntWorkBook As...
  4. D

    For loop macro between workbooks

    Hello, I have tried to get this question answered before but to no avail, so I am trying again. I have been struggling to make a macro that will simplify my workload. Simply put, the macro works between two workbooks, one that is opened in XLSTART and the actual book that is being worked on...
  5. A

    Setting a Workbook Variable's Value from Another Variable

    Is there a way toset the value of a workbook variable from another variable that holds a string? I already have oneaction that does this by using ActiveWorkbook ,as shown below, but I have twoother workbooks that is are data templates, one of which will be opened up bythe macro. Public...
  6. V

    What is wrong with my code? The line that is not responding is underlined and bolded.

    Dim path1 As String Dim Filename1 As String Application.ScreenUpdating = False path1 = Range("I7").Text Range("A1:f40").Select Selection.Copy Sheets("Laser").Select Sheets.Add After:=ActiveSheet Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone...
  7. P

    Toggle between workbooks

    I have a userform in a workbook called frmSelectFile with the workbook named Main. The userform opens other workbooks. Once those other workbooks are open, they are considered the Activeworkbook. So I had to Load frmSelectFile so workbook Main now is the Activeworkbook. So my question is how can...
  8. V

    Run time error 1004

    Getting an error on this.. Run time error 1004 Analysis.xlsx could not be found. Path is correct.. What it can be, pls guide.. Range("A4").Select ActiveSheet.PivotTables("PivotTable2").ChangePivotCache ActiveWorkbook. _ PivotCaches.Create(SourceType:=xlDatabase, SourceData:=Pth & "\" &...
  9. G

    VBA Code to Keep Formatting

    Good Morning, I've got the following code below to pull data from another spreadsheet. It works fine, no issues but I want the data to look exactly the same in the current workbook I'm using when I pull the data over. How do I keep the formatting consistent so it doesn't expand columns/rows...
  10. S

    VBA ActiveWorkbook vs. Set wb = ActiveWorkbook

    I don't think this a question specific to single script, but rather a general "Why?" is this so question. I can write code that will work, but I don't know why the code I think should work, won't and I don't know the correct terms to do a deep search for an answer . . . I've run into making...
  11. G

    Copy Specific Columns using VBA

    Good Afternoon, In the following code I'm importing data from another worksheet. As you can see it's currently importing range A1:T40. I want to copy a few specific columns from the report instead. It's about 8 columns, data going down to row 40. How would I do that? Sub...
  12. D

    Show UserForm in New Workbook

    Here's where I'm at... I initially show UserForm1 in the window for Book1. The user enters values into the textboxes of UserForm1 then clicks CommandButton1. The subroutine for CommandButton1 checks that the active workbook is the correct form. If not, it opens a new workbook using...
  13. S

    How to copy diffence range of sheets to another workboks with one time

    Hi all: I have code Brown to select excel files and copy Range("C11:J34") from sheets (2) to sheet("PL2") of Activeworkbook Now I want to Brown to select excel files and copy Range("C11:J34") from sheets (2) to sheet("PL2") of Activeworkbook And copy Range("C9:N44") from sheets (4) to...
  14. T

    Updating Pivot Table Data on Multiple Worksheets/ Pivot Tabs from Different Workbook

    Hello, First, my apologize if this is in the wrong area and/or this has already been answered. This is my first time posting and I am relatively inexperienced with VBA. What I am trying to figure out is how to do the following: 1. Lookup user inputs on the ActiveWorkbook for new workbook...
  15. C

    changing an excel workbook on one computer from an excel workbook on a different computer

    At work we use an excel spreadsheet to keep track of which process we are at for multiple sites. As only one person can access a workbook at a time, I created multiple single user workbooks that can Sync to and from a 'Master' workbook. That part works fine. What I want to do now is when one...
  16. E

    VBA - Break ALL external links

    Hey guys, I read quite a few posts about breaking or delinking links to external sources. I found quite a handy code, see below, to break links the easy way. However, I am stuck with a couple of annoying links to external sources: (1) Some links are stored within data validation (I copied one...
  17. K

    Personal Macro workbook sending emails Macro Problem

    I created a personal macro that would allow me to automatically send emails using Excel. The macro works fine if I am using the actual workbook where the macro was created but not on new workbooks. I believe the macro is generating the fields to search base on the work book where the macro was...
  18. 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...
  19. T

    How to access another workbook's ThisWorkbook

    Hello everyone, this is my first post! I am trying to make some code to copy a module from my add-in, to the active workbook's ThisWorkbook module. I can't seem to figure out how to access it though. Here's the code I'm using: <code style="margin: 0px; padding: 0px; font-style: inherit...
  20. B

    Selecting active workbook - not personal.xls

    Hi, First of all I'm a beginner in VBA, but thank you in advance for any help. I'm trying to create a macro to split all sheets from an active workbook into separate files. After a bit of a Google I've below the below code which works great for me. However, when I moved the code from the...

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top