activesheet

  1. 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
  2. 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...
  3. 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...
  4. BlakeSkate

    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...
  5. 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...
  6. 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...
  7. A

    Copy Activesheet To New Workbook

    How to Copy Active sheet to new workbook without shapes(buttons) ?
  8. 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...
  9. 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...
  10. 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.
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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, _...
  17. 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...
  18. Z

    How to select specific CheckBox's?

    I'm using a lot of checkbox's on a sheet and I would like to 'Select All' for only some of them. Currently I have a code that uses a checkbox to select all and deselect all. Here is the code I'm using: Private Sub CheckBox17_Click() Dim ws As Worksheet Dim oj As OLEObject Set...
  19. V

    Looping help to skip blank rows vba

    I am moving data from a source sheet to my activesheet. When I do, any blank rows on my source sheet are copying over as well. I do not want this. I want on my activesheet for all the data to be compacted together. How do I do this--what am I missing in my code below? Sub SkipBlankRows Dim...
  20. F

    Import csv-file

    hi! My code aims to import a csv file and make certain modifications, but I keep getting a 'Sub or Function not Defined'-error. Any ideas why? Sub allofit() Dim ws As Worksheet, strFile As String ActiveWorkbook.Sheets.Add After:=Worksheets(Sheets(2)) Set ActiveSheet = ws strFile =...

Some videos you may like

This Week's Hot Topics

Top