Search results

  1. Guus2005

    Fastest way to write to a text file

    I need to write about a million records to a text file. There are several ways to accomplish this. I need the fastest ofcourse. Method #1 Set fs = CreateObject("Scripting.FileSystemObject") Set a = fs.CreateTextFile("c:\testfile.txt", True) a.WriteLine("This is a test.") a.Close Method #2...
  2. Guus2005

    use batch file to set global variables

    How can i use a batch file to set a variable so that it doesn't vanish after the script is done? rem File1.bat set variable1=foo rem File2.bat echo %variable1% When i run File2 after File1 variable1 is not recognised. So the scope of variable1 is only within File1.bat present. How can i...
  3. Guus2005

    The fastest way to import over 2000 csv files

    Wat is the fastest way to import 2300 similar csv files into an Access table? There is a number of ways to accomplish this. I need the fastest. Thanks for your time!
  4. Guus2005

    Importing CSV files in a new to be created Access database

    Hi, I need to import 2 csv files which increase my database to almost 500MB. A primary key needs to be added to both tables and an index. After that i connect the tables to currentdb, perform a few checks als disconnect the tables and drop the database. So i've come up with this solution: I...
  5. Guus2005

    Automated Testing of an application

    Hi, Do you have experience with automated testing of an Access (or Excel) application? And if yes, how do you accomplisch that? Thanks for your time!
  6. Guus2005

    Solved Validation problem

    Windows 8, Office 2013, 32 bits My code gives an error on the ".Add" line. Can't figure out why. The error is 1004. Which doesn't give me any information. Unfortunately. Anyone? Public Sub GegevensValidatieAantalUrenMaand(ByVal rngTarget As Range) ' ' GegevensValidatieAantalUrenMaand Macro '...
  7. Guus2005

    Solved How to count the number of instances of a class?

    Howdy, Some time ago i posted this. A class to turn the hourglass on and off again. Option Explicit ' ' clsHourglass ' ' This class sets the hourglass on and off. Also when you forget to turn it off. ' Private Sub Class_Terminate() HourGlassOff End Sub Public Sub HourGlassOn()...
  8. Guus2005

    MZTools Quality Review

    I am using MZTools for quite some time now and i recently started to use the Quality Review. If you run it the result will look something like this: You can add your own rules. I added the one that optional parameters must have a default value. Now i am looking for a way to detect...
  9. Guus2005

    Office 365 and Cloud error 052

    I have taken over a small Excel application to store Child Care information; Who is here, when and how much money do i get. When they install the app on a system with a full office version there is no problem. However when they install it on office 365, some, not all, clients get an error...
  10. Guus2005

    repeating code under each worksheet

    Hi there, I have a workbook with 12 worksheets. The code for every worksheet is the same. A subset: Private Sub Worksheet_Activate() gstrPrevSheetName = ActiveSheet.Name End Sub Private Sub Worksheet_Change(ByVal Target As Range) TabChange Target End Sub In Access you can use...
  11. Guus2005

    OS Detection

    I want to be able to detect if my application runs on Windows, Linux, Apple, Chromebook, Android, ... Thanks!
  12. Guus2005

    End is a showstopper

    Just dropping it here: FYI: I didn't know it and never used it but the End statement is a real showstopper. Public Sub trythis() As Boolean On Error GoTo trythis_Error Debug.Print 1 / 0 On Error GoTo 0 Exit Function trythis_Error: End MsgBox "Error " &...
  13. Guus2005

    Access Game Block Destroyer

    I can't say that i made this. I wish i had the time... It is a Block Destroyer game created in access. It is a very old game and created many years ago. Even the url in the code and the forms brings you somewhere else. Ths game consists of 2 mdb files: AccessGameBlockDestroyer_e.mdb...
  14. Guus2005

    Identifier type characters

    When i have a question and looking for an answer i want to find it at my favorite site, AWF. So when i find a nifty piece of code i use it in a solution looking for a problem and post it here. This was what i was looking for: Dim V$ Dim T% Which means V is declared as a string and T is an...
  15. Guus2005

    Solved Paste values only

    Dear reader, I have a protected workbook and sheets but i am unable to prevent users from copying and pasting values in my sheets. It is a popular way to use the spreadsheet and fill it with data. I can understand that. But copying a value from one spreadsheet to another using ^c, ^v always...
  16. Guus2005


    I found this gem here on AWF. And i believe that it is outdated. It is obviously 20 years old and the return values are not always what i expect them to be. Examples...
  17. Guus2005

    Detecting Codepage

    I need to import a text file and instead of Günther it shows G?nther. (this is just an example) Opening the file in Ultraedit the hexadecimal value is 90. I usually work with UTF-8 and also Windows 1252 doesn't give me any problems. What i want to see is the name G?nther shown in every...
  18. Guus2005

    Code suddenly doesn't work anymore

    I have this code to open a file with the default application based on the extension. It is usually used for a .txt extension and it opened Notepad++. Public Sub openScriptInDefaultEditor(strFilename As String) 'File is opened in default editor Dim strFullPath As String Dim fso As...
  19. Guus2005

    TempVars; Why and What?

    I got an application in which they used TempVars a lot. Since i have never had the lack of pleasure of not having to use them i will have to now! So i was wondering why did M$ added the TempVars collection? Is it a special collection with added features and if so what are those features? Or is...
  20. Guus2005

    bang versus dot

    I always use a dot and never an exclamation mark. Is there a difference? Is one faster? And line 1000 compared to 2000? Example: 1000 frmProgress!cboProcesstatusG = rs!StatusProces 1001 frmProgress!txtDatVooraanVerzondenG = Format(gsJAL_G!DatVooraanVerzonden, "dd-mm-yyyy") versus...
Top Bottom