Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: qjd2004
  • Content: Threads
  • Order by date
  1. qjd2004

    Get Sender's address using VBA

    Hiya, I'm saving emails from outlook to an Access DB using VBA. I'm trying to get the sender's email address from emails. We're on IMAP here and the enterprise address book does not show up in Outlook. I tried using ADO/ADOX to connect to it like a table and it doesn't seem to want to play...
  2. qjd2004

    Connecting to IMAP folder in Outlook 98 through Excel VBA

    Hiya, With VBA, I'm trying to retrieve messages from an IMAP folder in Outlook 98 (the sub runs from Excel 2002 though). I can get the string name of the IMAP Root folder! Like this Set objOL = New Outlook.Application Set olNS = objOL.GetNamespace("MAPI") Set objFolder = olNS.Folders.Item(1) y...
  3. qjd2004

    populate list box with recordset

    Hiya, Using VBA, I'm trying to fill a list box with the contents of a recordset. I'm being a thick as it's putting each field from the rset into a new item on this list. How do you put each field into a new column ??? ReDim Arr(1 To rs.Fields.Count - 1) ReDim Lbox(1 To...
  4. qjd2004

    How to conect to Access db with a password

    Hiya, trying to connect to an access db that is password protected. I get a runtime error that says "Cannot start your application. The workgroup information file is missing or opened exclusively by another user" The db in question is not open and the workgroup file is not missing, it's where...
  5. qjd2004

    Updating records using ADO

    Hiya, I'm trying to loop through every row in a recordset and if the field rectype = 2 then execute some SQL on another SEPERATE ADO connection that deletes all rows from a table. For the row in the recordset that has the rectype of 2, I want to get the value of field "DistID" and use that in...
  6. qjd2004

    How to use ODBC to get data from Access through Excel VBA

    Hiya, I'm getting access data through excel vba. Everything works fine. I'm also using ADOX for DLL & Security to do stuff in access without opening the access databases in question. Now my end user is saying they won't have access installed. Can I still get data from the access databases if I...
  7. qjd2004

    How to populate list box (or combo!) from Access recordset?

    Hiya, I've come up with some code that goes and gets a recordset from ms access and I wanted to put the values into a list box or combo box. This seems to just hang up the program (excel) and crash. Can anyone suggest where I'm going wrong? Public Sub PopulateListBox(rectype As Integer)...
  8. qjd2004

    How to get a form to select a range based on a filter?

    Hiya, How can I get a form to give the user a list of values in column B and which ever one they select, all rows from A to AM where the value in B is the one they selected get activated/selected (so I can then do something with them in my code)? Any help much appreciated as I don't know much...
  9. qjd2004

    Trying to compare values in 3 columns?

    Hiya, Arrays are new to me and I'm trying to look at 3 columns and do some comparisons. :huh: I want to check in the ManagerArr() (assigned to a range in 1 column) and if the value is zero then compare the ClientArr() values and those in the MainframeArr() or else, compare the ManagerArr() to...
  10. qjd2004

    Help with an array please?

    Hiya, I've got a Sub that goes through ranges and colors in the cells depending on the value. In the 3rd part of the Sub, I use an array to see if values exist in column "M" and if they do then colour in the corresponding cell in "N." At the moment, it's coloring in cells in a different range...
  11. qjd2004

    How do I write and "If....Cell is In Range" statement?

    Hiya, I'm currently using a long winded sub to monitor the contents of a cell. Is there any way I can shorten this to say If target (cell) is in range("whatever") because I have lot's of ranges and it's gonna make future development very slow otherwise. Private Sub Worksheet_Change(ByVal...
  12. qjd2004

    What references do I need to automate outlook?

    Hiya, trying to send an email through outlook from excel. The excel VBA compiler says that the Active X component can't create the object, which I beleive is because I'm not refering to the correct component in my project settings. Thing is, I can't see any outlook references that aren't...
  13. qjd2004

    How do you unhide hidden worksheets then rehide?

    Hiya, trying to unhide all the worksheets in a workbook. My code skips from 1 wb to another and when in a workbook often switches between worksheets to gather and colate data. Having hidden worksheets is causing me problems, but the specification I'm working to demands that they remain hidden...
  14. qjd2004

    How to monitor contents of a cell?

    Hiya, I'm trying to monitor the contents of a cell. If the cell gets a value of "Y" or 1 then I want to execute a Sub. I've got some code which I've added to the worksheet I want to monitor, but it's not doing anything. Can somebody tell me why and how to make it execute? At Worksheet level...
  15. qjd2004

    Is there a simpler way of writing this control structure?

    Hiya, I've got a repetition structure with lots of double selection inside it. Is there a quicker way to write this (i.e. can I put a while within a for loop?) and what is the syntax? For Each cl In r If cl.Value = "Client vs MAINFRAME DO NOT MATCH!" Then cl.Select...
  16. qjd2004

    How do you define a user defined type? (ODBC Connection Sub)

    Hiya, got some code to get recordset from access and export to excel. The VBA editor complains about either "User defined type not defined" about the Set Conn = New ADODB.Connection or if I move that and try to delclare it in a type block, it says "INVALID INSIDE TYPE BLOCK" Can anyone help...
  17. qjd2004

    How do I refer to the value returned by this function?

    Hiya, I've got a function that checks to see what kind of drive a drive letter refers to (i.e. HDD or CD-ROM, etc). My macro saves to a location on a HDD, I want to specify which location depending on whether there is a fixed HDD called "D:\" or not. But I don't know how to refer to the value...
  18. qjd2004

    How do I assign a macro to a toolbar button in code?

    Hi all, I'v got some code that adds a toolbar button to a worksheet. How do I assign a Sub/macro to this button in the code? Also, I'm currently opening this macro every time the workbook opens, but is it possible to run it only the 1st time the workbook opens? Here's the macro Option...
  19. qjd2004

    How do you create and pass values to an array?

    Hiya, can some explain how to do arrays in VBA to me? In 1 of my modules I'm using a simple procedure to check for any values that are different from the first record in that range. If they are, then it adds them to the another cell. There's never more than 2 different values so I didn't need...
  20. qjd2004

    Subscript out of range when jumping workbooks

    Hiya, trying to jump from 1 workbook to another, starting in book1 jumping to book2 to copy a range from sheet "NUTS" and back to book1 to paste it into sheet "EUP." I get subscript out of range. here's my code: Sub CopyTheHeader()...

Part and Inventory Search

Back
Top