activeworkbook

  1. Y

    Command Button to Save File Based on Cell Value

    Hi All, I'm hoping for some help please? Ive been trying to create a button in excel that saves the file for the current workbook with the name as cell value and a path (Sharepoint). below is what i have so far, but doesn't work. HELP PLEASE Private Sub CommandButton1_Click() Dim path As...
  2. M

    VBA Track changes on shared workbook

    Hello Everyone, I have a VBA that copies a given sheet from my workbook.xlsm to a new workbook.xlsx and saves it in a shared folder. It works just fine, but I want it to enable track changes on the new workbook.xlsx before closing it. Since I'm not an expert on code, nor whatsoever!, I've just...
  3. B

    Exporting tab to new book error message

    Hello, Please see code below - I currently use this to export a hidden tab from a master document. However, there are 2 main issues with it, as follows: 1) Is it possible to set a name that this exported book saves as, i.e. "Book1", and if so, can this be set so that next time it will be...
  4. P

    Centre Userform over Activeworkbook

    I have multiple workbooks open at any particular time. I would like to be able to open a userform that is centred over the workbook that is actually opening the userform. I also have multiple screens so I can't use StartUpPosition as Windows Default, CenterOwner, or CenterScreen option. There...
  5. A

    ActiveWorkbook.Protect issues/questions

    Part of my Macro is protecting my workbook. If I run the same macro, with the workbook protected, it will unprotect my workbook even though there is nothing in the code telling it to do so. Is this a common thing with protecting workbooks in VBA? Below is a sampling of the my code...
  6. 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")...
  7. 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()...
  8. 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...
  9. 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...
  10. 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...
  11. VBE313

    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...
  12. 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...
  13. 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 & "\" &...
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. 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...
  20. 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...

This Week's Hot Topics

  • separating multiple Proper names (uppercase letters) from a list
    I have a list of proper names that only has spaces between their first and last names. I need a formula that can separate these names into...
  • 'for' Loop
    Hello guys, I am trying to do something new. With the help of a VBA code, in every case, last 2 Values of last 2 cells of columns D-15 to D-28 to...
  • Open specific pdf in folder with vba
    Hi, Below is the code in use , unable to find rich icon to put code inside using a mobile. The code in use is shown below. Everything works as it...
  • What is wrong with this For Loop code?
    I am trying to loop through each cell in Column U from U4 to last row to check if the percentage in the cell is greater than -.050%. In a...
  • Data to match
    Hi there, I have created 2 worksheets with data. First is all materials used and second has the bottle type used for each of material. How can I...
  • Shifting Columns
    Hi Dear Community, I'm trying to find the best way to Shift (Cut - Paste) all the information below and to the right of the "Worker" cell in VBA...

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
Top