debug.print

  1. H

    Porblem to line

    Hi, How to resolve https://1drv.ms/u/s!Ai8CrEskdewXm1UXeAKPcd2mrkZJ due to last line below Workbooks.Open Filename:=fl fn = ThisWorkbook.FullName Debug.Print fn Application.Workbooks(fn).Activate
  2. P

    Query to write to Txt File

    Hi, There are lots of topics on writing to txt files and userforms but I am not sure if I follow how to apply there. I have the below query that I would love to have a log file within Access table or have it output a text file to a folder. The debug print immediate window out put is sort of...
  3. C

    Dictionary, item, object required error

    I am getting an object required error when I run the following code: Sub Schedule15(theDictionary As Dictionary) Dim singleKey As Variant For Each singleKey In theDictionary.Keys() Debug.Print theDictionary.Item(singleKey).Country Next singleKey...
  4. J

    autofill method of range class failed

    Sub PreAudit() Dim ptc As Range Dim ften As Range Dim dollars As Range Dim dollarsr As Range Dim ascalcr As Range Dim asvarr As Range Set ptc = Range("A1:AZ1").Find("PreTenCont").Offset(1, 0) Set ften = Range("A1:AZ1").Find("fte num").Offset(1, 0) Set dollars =...
  5. baitmaster

    getting Connection information using VBA

    I'm analysing a bulk set of files and want to log details of each one, including any Query and Connection information. I'm struggling to extract the Connection String Within my code loops I have the following so far Debug.Print "_______________________" & vbLf & "Queries and Connections:" For...
  6. dreid1011

    Trouble with Shapes

    Good afternoon, In an attempt to solve another's problem, I am playing with shapes. I am trying to detect overlapping shapes created through vba on demand. I have a list of x and y coordinates and convert those to a position on a chart. The problem I am running into at the moment, is that...
  7. P

    Code works during step through, but not when I run it. Ugh

    My Sub is putting the date stamp as intended, but then its as if it bails on everything after that point. It's supposed to format the two columns and then delete certain dates based which rows are headers. Any thoughts why this is happening? Every time I run it, the formatting is never right...
  8. P

    Resize

    I don't understand why I can't resize the selection!!! I figured since HDR2 is a range variable I would be able to just reference the variable object, select it and resize it. I would have thought it would just be HDR2.resize(0,-2).select But I keep getting "Application-defined or...
  9. P

    Delete Specific Rows

    Hi Friends, I am writing a macro that resets the sheets I'm working with. On one page it simply clears contents of the columns I use, but on the other sheet I need to actually delete all rows except for the ones I've defined. So I want to delete all rows from row 2 down to LstRow But don't...
  10. P

    Filter and delete rows based on date prior to Current Month

    Trying to delete any rows that have a date prior to the 1st day of the current month. When I debug.print my variable MTD it gives the date 8/1/2018, but then when I filter and delete rows it goes haywire. Any advice? Sub MTDapps() With Sheets("Table") Rows.Sort Range("J2")...
  11. P

    When I step through, it works. When I run the macro, it doesn't

    This macro is supposed to place an "x" in column z once a row has been copied and pasted, so that I can add items to the list without re-adding all the items on the list. When I step through the code, I watch the x get placed in column Z. But for some reason, when I run it from the button on the...
  12. P

    Trying to reference my range variable to format the new range... doing something wrong!

    I am trying to insert a row above the cells that have text values that begin with the word "ASSET", and the same thing for "Income". I've got my code below working up to a point It inserts the row above ASSETS and INCOME correctly then I want to select cells (B?:D?") to format those 3 cells in...
  13. P

    Userform always opens on other monitor (dual monitor)

    Working on this user login form and I've got it working except that every time I open the workbook, the userform appears on another screen. I want it to appear right in the middle of the excel application. I've researched this and I've come up with this piece of code, but it moves the userform...
  14. R

    Ignoring XML DTD with Excel VBA

    Hi, I am trying to write a macro to load an XML file to memory and then walk through its various nodes and perform some actions. However, the XML documents that my macro is supposed to read contains a reference to an external DTD and each time when I run my code, I am getting the following...
  15. P

    If then not working ???

    If there is an "x" in sheet("Doc Request") cell B4, I want my code to put a value "x" in the Sheet "Master" Cells C4, C5, C6, C7 I actually want to perform a couple of operations if that condition is true, but right now I need to at least get that line of code working again (This was working...
  16. P

    How to offset a RefEdit1 Cell Value

    Private Sub cmdbtnDone_Click() Dim r As Range, r1 As Range Set r = Range(RefEdit1) Set r1 = r(1) Debug.Print r1.Address Debug.Print ActiveCell.Offset(0, 1).Range(r1.Address).Select End Sub The above code finds the first cell of the Range selection from the RefEdit. Then for test...
  17. V

    VBA Filter by range

    Hi All I am trying to filter by a range of values , but nothing happens. please help. PS: howto Debug.Print a range (like workbook ..sheet ... A1:A100) Debug.Print rngallean.Value Debug.Print rng1.Value Dim template As String template = ThisWorkbook.Name...
  18. S

    Is this possible in theory? - Workaround needed working with variables

    I posted a few days ago looking for a solution to this but didn't get much back, however, it was a rather complex way of putting it, so I am hoping by recreating the issue in a simple scenario, I may just get some help :-) Sub varTest() Dim i As Integer Dim theSum As Integer i = 1 X...
  19. R

    Test to see if sheet exists fails to test a graph sheet.

    Hello In the following code I am trying to see if a worksheet exists and if not I want to create a graph as a worksheet (I am not sure what the propper term for this is). However the test does not test the worksheet that contains the graph only the regular worksheets. Any help to determin if the...
  20. MUKESHY12390

    Find out Mail type - Outlook loop

    Hi, I'm trying to loop through the mails in particular folder, the code I have written code it works but gives the problem when folder has other items other then simple mail(mailItem). currently I have 3 things on folder 2mails and 1 meeting invitation, because of meeting invitation I get...

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
Back
Top