activesheet

  1. 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...
  2. 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...
  3. 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...
  4. 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
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. A

    Copy Activesheet To New Workbook

    How to Copy Active sheet to new workbook without shapes(buttons) ?
  11. 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...
  12. 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...
  13. 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.
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. D

    XPS File Save

    Hi, I'm trying to prevent xps overwrite on save. I can't get anything to work. I'd prefer to use a variable value to individualize each save. Is it even possible? With ActiveSheet .ExportAsFixedFormat _ Type:=xlTypeXPS, _...
  20. N

    Require Correct Syntax using .Formula = "=Substitiute...." between two sheets

    Hi Can anyone help me with correct syntax for the following ActiveSheet.Range("B1").Formula = "=SUBSTITUTE(A1,TRIM(RIGHT(SUBSTITUTE(A1,""."",REPT("" "",255)),255)),TRIM(RIGHT(SUBSTITUTE(A1,""."",REPT("" "",255)),255))+1)" Instead of using ActiveSheet. Range would like to use Sheet1 and...

Watch MrExcel Video

This Week's Hot Topics

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