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 SkipVought 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: *

  1. feipezi

    Do we have a VBS version of listing files in a folder?

    Hi, There is a function 'filelist' on the web in Excel macro but I am looking for a similar func with VBS, which can be run in Window Explorer. Thanks in advance. Here is the Excel macro/function 'FILELIST'. Function FileList(fldr As String, Optional fltr As String = "*.*") As Variant...
  2. feipezi

    How to make a recorded Excel macro (convert a text file to a Workbook) more efficient?

    Thanks folks for your reply. Andy, sorry that I cannot provide samples due to company policy, which is getting stricter and stricter. We all know nobody can take a few lines of data to perform fraud... combo, I tested your code. It should be working but the TXT file that I used has no specific...
  3. feipezi

    How to make a recorded Excel macro (convert a text file to a Workbook) more efficient?

    Hi, I recorded a macro that can convert a text file into an Excel workbook. But the code looks messy with quite some redundant statements. I tried to streamline it but with no success. Like the Arrays, do we need that many arrays? Besides, what if I have more than 30 fields? That being the...
  4. feipezi

    How to get the macros back as they vanish somehow in a AccessDB?

    Hello combo, please see my comments below, in upper case. I understood that your recent database has no macros (i.e. at least VBA, as you checked this in VBE), with recent data from May. You have older copies, working, latest with April data. I am right? YES, YOU'RE RIGHT. I'M RUNNING JUNE...
  5. feipezi

    How to get the macros back as they vanish somehow in a AccessDB?

    Hello dHookom I tried your way but did see any hidden macros. I will keep checking because the size of the DB is bigger than expected. I still suspect there be some old macros hidden somewhere. Hey combo, I understand what you recommended. But the fact is the new data is supposed to be created...
  6. feipezi

    How to get the macros back as they vanish somehow in a AccessDB?

    Thanks combo for the quick response! I can certainly try what you suggested. But the old (or the problematic DB) has no macros any more. It means I need another similar DB where macros are residing to be the source so I can copy the macros over to the new DB, correct? Btw, after I copied the...
  7. feipezi

    How to get the macros back as they vanish somehow in a AccessDB?

    Hello folks, I have an AccessDB with a size of abound 30 MG. There are tons of macros in it. I am responsible for running some production jobs at the beginning of a month. A few associates did the similar thing a few days ago. As I took over, I found none of the butotns, back up by some macros...
  8. feipezi

    Hoe to fix run time error 2147217900 (80040e14) syntax error in Order By clause

    Hello combo, I need more help from you. You can see the code below. I have 10 data tables to be checked out making sure those tabs are updated, i.e., having the latest data. But each tab has different date to check on. The example below shows TERM_START_DT; others may have RUN_DATE or...
  9. feipezi

    Hoe to fix run time error 2147217900 (80040e14) syntax error in Order By clause

    Hello, I cannot figure out what's wrong with the syntax on the SQL statements. It's not a complicated process, is it? All I want is to check out if the input dataset has been updated. So I can run my process if it has. The query that I ran was in Excel ADO. But the dataset resides in MS...
  10. feipezi

    How to pull data from MS Access DB and place on an Excel spreadsheet with WHERE clause?

    Sorry Andy. I was out of town. Some more questions. Sub ExportAccessDBtoExcel(dsn As String, DTE As Long) ... ConnCmd.CommandText = "SELECT TOP 50 * FROM " & dsn _ & "ORDER BY " & DTE & "DESC" ... Sub tnt() ExportAccessDBtoExcel "CO_PNC_CO_RPT_NBEXTRACT", TRANDATE End Sub got error like...
  11. feipezi

    How to pull data from MS Access DB and place on an Excel spreadsheet with WHERE clause?

    Hey guys, Thanks for the up date. Now I have another question for you. I set up the small process years ago but unable to remember how come there is no header in the output. Could you help me create the header in the output? Thanks again. Sub GetData_From_Workbook() Dim jqzConnect As String...
  12. feipezi

    How to detect dups and/or sum by group?

    Hi, Is there any way of combining the following two Subs into one? Or it looks messay. Thanks. Sub SumByGroup(keyfield As String, datacol As Integer, destcol As Integer) 'keyfield: the field of key, datacol: Offset number, if keyfield is "a" then datacol=2 means data in field "c" 'destcol...
  13. feipezi

    How to pull data from MS Access DB and place on an Excel spreadsheet with WHERE clause?

    Thanks Andy for the quick return. I ran your code with minor modifications. But I have zero output. The snapshot that I attached is from the DB table that does have the records that satisfy the WHERE clause condition. But I can output the whole Access table if remove the WHERE clause. So the...
  14. feipezi

    How to pull data from MS Access DB and place on an Excel spreadsheet with WHERE clause?

    Hi, Not sure if the subject is more like supposed to be in the fields of Access forum but the destination is in Excel. Please forgive me if I came to the wrong site. I copied a part of the code from Youtube but I need to set up a query to output a small subset of data from an Access table (the...
  15. feipezi

    How to find a string from multiple Word files, which are listed on an Excel spreadsheet?

    Sorry folks that you feel that way. Yes, all 132 files are on a spreadsheet of Excel but I will read them from a folder, because the filenames on the spreadsheet have no path or folder name. I tried using VBS to read the files and pick the file I need. Please check the code below. Dim Word...
  16. feipezi

    How to find a string from multiple Word files, which are listed on an Excel spreadsheet?

    Hello Strongm, Thanks for replying. I don't really concern the code is in Excel or Word. I guess it's relatively easier to do it in Word because it is the Word documents that I need to find out about. Here is why I am doing that. I need to check some contents of one particular document, among...
  17. feipezi

    How to find a string from multiple Word files, which are listed on an Excel spreadsheet?

    Hey Combo, I tried your way of placing the code in an Excel VBA editor and I got some errors shown in the attached. Could you give me more details about your 'reference'? Thanks again. https://files.engineering.com/getfile.aspx?folder=fd73025a-a8b9-4b4f-a9f9-2a7c40827f82&file=Capture0308.PNG
  18. feipezi

    How to find a string from multiple Word files, which are listed on an Excel spreadsheet?

    Okay. Sorry that I didn't make myself understood. Let me try again. What I need is a For loop or While loop to loop thru a whole bunch of Word documents in a folder. And it has nothing to do with Excel. But the macro should be residing in a Word document's VBA editor. I have a small search...
  19. feipezi

    How to find a string from multiple Word files, which are listed on an Excel spreadsheet?

    Thanks for the quick return! You can see from the attached that I have about 82 files (docx) for me to go through. But they are all on an Excel spreadsheet. I can set up a FOR loop the loop through the 82 cells on Col B but that's in Excel. How can I link it to Word so your code can be...

Part and Inventory Search

Back
Top