Search:

Type: Posts; User: sleuth; Keyword(s):

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    7
    Views
    3,817

    Re: Using VBA to run SQL commands

    Thanks. I've checked all your links and don't seem to be getting anywhere. I'm going to try posting this question on Stack Overflow.
  2. Replies
    7
    Views
    3,817

    Re: Using VBA to run SQL commands

    I'm needing help with my connection string. Can anyone help me with this?
    I'm connecting to a database via Oracle SQL Developer. I am able to connect within the UI by providing the following items:...
  3. Replies
    7
    Views
    3,817

    Re: Using VBA to run SQL commands

    bump
  4. Replies
    7
    Views
    3,817

    Re: Using VBA to run SQL commands

    I found this code on another site, but I'm having trouble getting my connection string to work. My macro errors out on the cnn.Open statement and says the Provider is not installed. I think it's...
  5. Replies
    7
    Views
    3,817

    Using VBA to run SQL commands

    Has anyone used VBA to run SQL commands from a command line?

    I have SQL Developer installed on my machine, and there is a command line interface using the command "sdcli".
    I want to figure out...
  6. Using Excel VBA to perform repetitive web browsing tasks...

    I would like to write a macro to go to an internal company website to download data and import it into my spreadsheet. The website requires me to login and do a series of mouse clicks to download the...
  7. Replies
    15
    Views
    257

    Re: Column Comparison Macro

    It wasn't sheet 1 and sheet 2, but basically the idea was to look at "Distribution List Check" Col B (shtB) for values of "Survey Results (Raw)" Col C (shtC). If those values were not there, then...
  8. Replies
    15
    Views
    257

    Re: Column Comparison Macro

    Success!

    Here's what worked. I have some work to do to make it robust but I got the basic function down.


    Sub Find_Invalid_Entries()
    Dim shtC As Worksheet
    Dim shtB As Worksheet
    ...
  9. Replies
    15
    Views
    257

    Re: Column Comparison Macro

    Taking a break for lunch. Here's where I am.
    Still thinking there's a problem with the Copy/Paste statement but haven't figured it out yet.


    Sub Find_Invalid_Entries()
    Dim shtC As Worksheet...
  10. Replies
    15
    Views
    257

    Re: Column Comparison Macro

    Added a msgbox to show the range of shtC as well, and that in fact does display the range. So I believe both sht B and sht C ranges are properly defined before going into the For Each loop. I'm...
  11. Replies
    15
    Views
    257

    Re: Column Comparison Macro

    Ok, with the code below, the first msgbox shows me I now have a range of numbers in Range("B:B") for the active sheet (shtB). The If Statement still takes me to the "No Invalid Entries Found" msgbox....
  12. Replies
    15
    Views
    257

    Re: Column Comparison Macro

    Trying to do some error checking. Looking at your code again, it looks like where you used Is Nothing you're trying to copy the lines if No Invalid Responses are found, so I modified it as below.

    ...
  13. Replies
    15
    Views
    257

    Re: Column Comparison Macro

    Still having the same result... it runs, but no results. Not sure what's wrong. Your code makes sense to me.
  14. Replies
    15
    Views
    257

    Re: Column Comparison Macro

    Yes, on "Survey Results (Raw)" and "Invalid Responses" the first and 2nd rows up to the last used column are merged.
  15. Replies
    15
    Views
    257

    Re: Column Comparison Macro

    Thank you. I ran your snippet and it did not appear to do anything at all. Then I realized I had swapped the master list and the 2nd list so I swapped them and tried running again, but again it seems...
  16. Replies
    15
    Views
    257

    Re: Column Comparison Macro

    I wish I could edit my posts. Found a couple mistakes in my original code.


    Sub Find_Invalid_Entries()
    Dim r1 ' last row of the list with survey results
    Dim r2 ' last row of the...
  17. Replies
    15
    Views
    257

    Column Comparison Macro

    I want to write a macro to compare two columns on two separate sheets.
    I want to search values in a column against a master list of valid entries for values from another column. The idea is that if...
  18. Ribbon locks up/non responsive after running user form macro

    I have a userform which creates a new file and then pastes data into that file from the current file.
    I'm having an issue though, in that the ribbon doesn't respond in the new file until I go into...
  19. Replies
    7
    Views
    98

    Re: Paste Method in Worksheet Class failed

    It does now, and it was originally. After I put in your suggested changes, it was not activating the Survey Results (Raw) so it was inserting column E into the source data. Then when I ran it again,...
  20. Replies
    7
    Views
    98

    Re: Paste Method in Worksheet Class failed

    Solved it. I added a ThisWorkbook.Activate and a Sheets("Survey Results (Raw)").Select statements.

    Here's the final solution. I'd still like to know why mine didn't work.

    <code>
    Sub...
  21. Replies
    7
    Views
    98

    Re: Paste Method in Worksheet Class failed

    Actually, it looks like it's adding the column in the source file (copied data) each time thru, and then pastes the source data plus the new columns every time i run it.
  22. Replies
    7
    Views
    98

    Re: Paste Method in Worksheet Class failed

    Fluff, that did the trick. I'm not sure why my version didn't.

    However, I'm noticing every time I run it with your code, it adds another column at column E.
  23. Replies
    7
    Views
    98

    Re: Paste Method in Worksheet Class failed

    Editing for clarification.
  24. Replies
    7
    Views
    98

    Paste Method in Worksheet Class failed

    Fairly new to VBA, but I did search several other threads with this same error but none of those solutions seemed to work.

    I'm trying to create a subroutine that prompts a user for a filename,...
  25. Re: Retaining cell formatting when transferring data to another workbook

    That did it! Thanks.
Results 1 to 25 of 27
Page 1 of 2 1 2