1. Saher Naji

    Sort values based on colors, then on values using VBA code

    Hello, I'm tryin to sort values based on colors, then on values The macro was working very well, but on one sheet, so I have to create a new module for each sheet, and because I have around 400 sheets, This is the simple working macro: Sub A_Sort() ' ' A_Sort Macro ' '...
  2. AWM21

    VBA - UserForm Populate table on hidden or non active sheet.

    Hello, I'm having an issue and I can't find a simple solution. I have (2) UserForms that each fill tables in two separate sheets. Problem is, I want to run the forms from a Dashboard and the forms only fills cells on the sheet I'm active on. I need UF1 to fill sheet2 and UF2 to fill sheet3 all...
  3. J

    inserting pictures through vba, but the position and range doesn't match

    Hi, i made a macro by clicking the cell and inserting a picture image. But, the vba range and the sheet range doesn't match. ex. i want to insert a picture in cell b6 but it seems the picture inserts in between b5 and b6. this is my code below Private Sub Worksheet_BeforeDoubleClick(ByVal...
  4. J

    Copy/Paste ActiveSheet and rename with Increment based on old name

    Good Afternoon everyone! I need help a macro that increments correctly. The macro i'm trying to tweak is meant to copy the activesheet, and paste the duplicate with the old name and the revision number. i.e.: ORC01 to ORC01_R1 since this macro is applied to a button on the activesheet, it...
  5. A

    Getting number of columns of a particular sheet while looping through sheets

    Hi all! I want to automatically check a number of files whether their column numbers corresponds to the number of columns of another sheet. I have tried to solve that like this: Workbooks.Open Filename:=Path2 & NewList(o), ReadOnly:=True, UpdateLinks:=False For Each Sheet In...
  6. G

    Change activesheet name and sheets added dynamically

    How do I create a code for changing my ActiveSheet to a name and subsequent added sheets with name +1 ? E.g. WS1, WS2, WS3
  7. S

    Since O365 -> macro pdf to e-mail is failing

    Hi, Recently I have Office 365 and also SharePoint with the new "Team Sites" environment (previously called workgroups). Anyhow, I have a macro which convert the excel sheet into pdf and puts this pdf in an email ready to send. This is the coding : sub sendPDF() Dim OutlookApp As Object...
  8. G

    VBA - SQL Database - ActiveSheet.Name

    Hi, Straight to the point but here is the code stADO = "Provider=SQLOLEDB;Data Source=UKD1-ENG-01;Initial Catalog=" & ActiveSheet.Name & "WWALMDB;User ID=SA;Password=*****" Basically this works, however instead of it pulling from: (sheet name)WWALMDB i would like it to pull from...
  9. DataBlake

    How To Delete Column S to Last Column?

    I have this code and its not working, can anyone explain to me why? sub test() Dim lastCol As Long with activesheet lastCol = .Range("A1").SpecialCells(xlCellTypeLastCell).Column Columns(17 & ":" & lastCol).Delete Shift:=xlToLeft end with or sub test() Dim lastCol As Long with...
  10. H

    ActiveSheet Refresh

    Hi, I think this is a simple question but I can't figure it out. I'm using this code to refresh a pivot if data on a worksheet is changed but it's refreshing all pivots rather than just the pivots on the active worksheet. Where I'm running into issues is that I dont want to have to specify the...
  11. H

    Copy complete sheet content into a given sheet, based on sheet name from combobox

    Hello, everyone! I am new to VBA,nice to meet you. I have the following application plan: 1) there is Diagramme sheet on index number1 for visual Evaluation of processig data. 2) there is a "to be shown in sheet 1" sheet as data Input on sheet with index number2 3) the following Sheets are raw...
  12. A

    Copy Activesheet To New Workbook

    How to Copy Active sheet to new workbook without shapes(buttons) ?
  13. M

    usedrange no longer working

    I have some simple code that has worked for many years to fix the used range within a sheet after deleting a bunch of rows. Now it doesn't seem to work anymore. It was working through Excel 2013 but now that I'm using Excel 365, it has stopped working. Sub FixUsedRange() If...
  14. L

    Application Class

    Hi Using Object browser, Application class has the following: Activecell as range Activechart as chart Activesheet as object Activeworkbook as workbook ActiveWindow as winodw All of them make sense to me except ActiveSheet? Why is define as Object? What does that mean? Why they did not...
  15. L

    activesheet as object!

    Hi Excel defines ActiveSheet as following: (using object browser) property Activesheet as Object Read only Member of Excel Application My question, what does object means here? I thought the correct definition should be Activesheet as Worksheet Thank you very much.
  16. A

    Change macro from all sheets to active sheet

    Hi Guys, I have a macro that inserts rows in a workbook and is applied to all worksheets, this works great but I am trying to modify it to only work on the open worksheet (i am supposing this is activesheet) but it keeps failing. The code that is working on all the sheets is as follows Sub...
  17. T

    VBA Create a table

    Hi Guys, I have recorded a macro to create a table which works fine but i'm wondering if there is a way to change the range so it looks to the last row in column P rather than the selected range. Hope this makes sense. Thanks Sub CREATE() Sheets("Bethan").Select Range(Selection...
  18. J

    how to know which cells have comments in a sheet? (ActiveSheet)

    Hi all, how to know which cells have comments in a sheet? (ActiveSheet) thanks...
  19. B

    Changing the Active sheet in a macro

    Hi, I asked a question last week about filtering out a number of items in a list. However, the sheet that is used for this prois set to the Activesheet: /[code] 'master sheet Set ws1Master = ActiveSheet ' --> Can this be changed to a new created sheet? [code]/ I am running a series...
  20. W

    Code stops, VBA editor opens automatically...

    Hi All, I have some code running on my computer that is operating fine, but on another guy's computer, it gets hung up. on the Worksheet Change, I have this code (partial): Private Sub Worksheet_Change(ByVal Target As Range) Application.ScreenUpdating = False Application.EnableEvents = False...

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
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 "".
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