object

  1. H

    Variable workbook declaration

    Hello I have a workbook that contains data and a VBA to do some tidying up and formatting. I need to be able to open up 2 other workbooks to do a vlookup on, the problem I have is the 2 workbooks change name everyday. How do I declare these other 2 in my main workbook. Any suggestions would be...
  2. T

    For Each Loop

    Following from this thread: https://www.mrexcel.com/forum/excel-questions/1114405-collections.html I was told this piece of information: Syntax ... For Each element In group ... element ... For collections, element can only be a Variant variable, a generic object variable, or any...
  3. R

    Clear All Permissions in Data Source Settings Using VBA

    Sounds simple but I cannot find any information on how to clear all permissions in Data -- > Get Data -- > Data Source Settings --> Clear Permissions --> Clear All I have trawled the internet for a while but sadly to no avail. If anyone could atleast tell me where in the object model I can...
  4. W

    Importing multiple excel files into one spreadsheet

    Hi, I'm trying to import multiple excel files (with the same format into a single spreadsheet) so that each day's file is listed underneath the previous day's data. To make it more complicated each day's file has two tabs that i need to import but I'm assuming the code below will do this...
  5. H

    Excel VBA GetFolder from 2 Drive (2 location)

    I had a code which work very well for 1 location (path) Possible to open and run 2 location? Sub GetFolder() Range("A:L").ClearContents Range("A1").Value = "Name" Range("B1").Value = "ParentFolder" Range("A1").Select Dim strPath As String strPath = "K:\VIEWING" 'strPath(0) =...
  6. H

    Get the List of multiple Folder in Excel

    possible to Import List (path) of Folder Names from multiple Folder in Excel Sub ListFolders() Dim MyPath As String, MyFolderName As String, MyFileName As String Dim i As Integer, F As Boolean Dim objShell As Object, objFolder As Object, AllFolders As Object, AllFiles As Object...
  7. D

    Object required

    I am getting the object required error with this code: Sub cmdCopy() Dim wsDst As Worksheet, wsSrc As Worksheet, tblrow As ListRow Dim Combo As String, sht As Worksheet, tbl As ListObject Dim lastrow As Long, DocYearName As String, Site As String, lr As Long Dim RowColor As Long...
  8. A

    VBA - Auto login to website

    Greetings, I wonder if anyone could help me please I am trying to put together a macro to log into a website. This is the code I currently have, Sub IE_LOGIN_NEWLINE() Dim appIE As Object: Set appIE = CreateObject("InternetExplorer.Application") With appIE .navigate...
  9. B

    How to access value and change events of Userform dropdown in another workbook

    Is there a way to capture the userform object in another workbook in the same instance of excel or different instance of excel? Currently we have a drop down value for a userform save its value to the excel worksheet which we pull the value from in another workbook . However I am wondering if...
  10. J

    Object unexpectedly changed in VBA project window - how to change back?

    Hi, Working on a spreadsheet containing VBA, last night, closed it and it contained 1 Workbook object (ThisWorkbook) and several Worksheet objects) Today, in the Project window, two worksheet objects have changed icons and showing as Workbook objects?! This is causing an issue with a save...
  11. B

    How to acces ADO disconnected recordset object from another workbook

    Is it possible to have a recordset object created in one workbook but access this recordset object from another workbook's vba code? I was thinking maybe getobject could be used to capture it from another workbook but I cannot find any resources on this.
  12. L

    worksheets the collection

    Hi The + sign in the sheet tab that is used to add a new sheet, is it the Worksheets "Collection" object in VBA? Thank you.
  13. kelly mort

    General knowledge on datepicker - 32 bits vs 64 bits compatibility

    So I developed a few problems with datepicker in excel currently then I have to do more reading about that object.What I found was that it does not work well on the 64 bits office versions.When I tried testing it on 64 bits office version, it said it couldn't load the object. Then when I went to...
  14. B

    Microsoft Access 14.0 Object Library

    Hi, I have an Access Macro. In this macro, Microsoft Access 14.0 Object Library is ticked in Reference. I want to un-tick this reference. However while doing so I get pop-up as ‘Can’t remove control or reference; in use’. How do I find out what objects in my macro are related to this reference...
  15. N

    Stripping text in Excel

    Hi everyone, Is there a chance somebody can please help with a formula which will basically remove all the text from this text block (example) pasted in excel: In literary theory, a text is any object that can be "read", whether this object is a work of literature, TK8881122 a street sign, an...
  16. T

    Object Variable or With block variable not set error

    Hello, Using stream.WhiteLine in a VBA script is giving me the Object variable or With block variable not set error msgbox. Clicking on the Debug button brings me to the line that is written stream.WriteLine " " This is happening at the end of the script. But, I've used the stream.WriteLine...
  17. L

    Trust access to the vba project object model

    Hi I am reading about macro settings and found this link about the option [] trust access to the vba project Mine is not check and I ran many small macros without problem so far. I read what is explained below but did not understand it well. Could you please explain to me why I need this...
  18. J

    VBA Insert image into a cell

    The following code successfully downloads the image from the URL and saves it to the location specified. Is there any way I could adapt it to insert it straight into the sheet? Thanks in advance. Sub SavingImagesfinal() Dim http As New XMLHTTP60, htmldoc As New HTMLDocument Dim htmlas As...
  19. K

    Object Required error with ActiveX Combobox

    Why do codes A & B below give me an Object Required (424) error (A is assigned to a button, B obviously fires on WB open) but C works without any issues?: A: ComboBox1.Value = "" ComboBox2.Value = "" B: Private Sub Workbook_Open() Dim ROWC As Integer ROWC = Worksheets("JOB...
  20. B

    Adding vba macro to outlook on runtime

    Hi, I have found some code that allows the user to add a macro to an excel workbook at runtime. Is this possible to do for an outlook object? This method works for dynamically adding a macro to an excel object but I cannot find an equivalent for outlook. <code class="" style="box-sizing...

Some videos you may like

This Week's Hot Topics

Top