activeworkbook

  1. M

    maneuvering btwn workbooks with vba

    Struggling with "activeworkbook" vba. I have a spreadsheet with a button (who doesn't, right?). This button is supposed to take all of the .xlsx files, recognize the name, and save as pdf's to various destination folders on sharepoint/teams based on that name. Most of that actually happens...
  2. SkywardPalm

    Converting Application.ActiveWorkbook.Path to Application.ActiveWorkbook.FullName in specific line of VBA

    How should I go about converting this path to a dynamic path with file name that could be changing. activeWorkbookPath = "'" & ActiveWorkbook.Path & "\[Variance Analysis Template v5.xlsm]temp_data'!R1C1:R" & LastRowCurrent & "C3" I've read that I can use Application.ActiveWorkbook.FullName to...
  3. M

    Clear Only Numeric from Column (workgroup)

    Hello all, I am using the below code Sub ClearContentsPCA() On Error Resume Next ActiveSheet.Columns("D").SpecialCells(xlCellTypeConstants, xlNumbers).ClearContents On Error GoTo 0 End Sub It working fine but I need to clear only numbers from the whole workgroup at column...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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")...
  10. 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()...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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 & "\" &...
  17. 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...
  18. 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...
  19. 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...
  20. 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...

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