activesheet

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

    Copy Activesheet To New Workbook

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

Some videos you may like

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
  • CELL FORMAT - IF CONDITION
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...
Top