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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.