Search results

  1. 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()...
  2. Guus2005

    Saying hello

    Hoi Caveman! Welkom op het forum. Je zal niet worden teleurgesteld! Groetjes, Guus
  3. Guus2005

    MZTools Quality Review

    About to add a new rule: Events must always have errorhandling. Events are the last line of defense. If an unhandled error occured it bubbles up to the triggered event. If it is not handled it generates a runtime error which is shown to the user and most likely the application crashes. So it is...
  4. Guus2005

    MZTools Quality Review

    SQL Injection. First that comes to mind: With regular expressions you can do almost anything. You can use regular expressions in a rule. So i'll look into that. Any object with the method .delete or .remove can be questionable. Perhaps i can make a rule to detect those too. Thanks Colin!
  5. 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...
  6. Guus2005

    Office 365 and Cloud error 052

    gstrBestand = ThisWorkbook.Path & "\KSM.LOG" If Dir(gstrBestand) = "" Then Open gstrBestand For Output As #1 Print #1, "Logbestand van KSM" Else Open gstrBestand For Append As #1 End If Print #1, " " 'Spatieregel Print #1, Format(Now(), "dd-mm-yyyy")...
  7. Guus2005

    Solved Accdb: Game Block Destroyer (see Guus2005)

    Here it is, the link to the original post
  8. Guus2005

    Debugging Options when Excel Crashes

    Always good to put an error handler in *all* your events. Because they are the starting point and endpoint of *all* the code you run in you application. When there is an unhandled error it always bubbles up to the event which results in a runtime error or crash if the error is not taken care of...
  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

    Thanks for all the answers. When you can't execute code you can't detect anything. The site from where the application can be downloaded clearly states that only Windows OS is supported. I was looking for a nicer way to inform the user. But apparantly that is not possible. Perhaps we can modify...
  12. Guus2005

    OS Detection

    How can i run a javascript script from vba and use the return value? This little gem i can use. #if Mac then 'Run on Mac #else 'Run on PC #endif
  13. Guus2005

    OS Detection

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

    End is a showstopper

    That's probably why! I think i'm going to use it as my *safe* word from now on!
  15. 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 " &...
  16. Guus2005

    Solved Help with a union query

    Yes, it is. You use them all the time. I know it is not nice to look at. But it gets the job done. You might want to chop it into smalller pieces so it is better to debug and you still know what happens when you look at it a year from now...
  17. Guus2005

    Solved Help with a union query

    Try this. SELECT TOP 10 * FROM ((SELECT TOP 3 * FROM (SELECT *,Rnd(ID) AS RandomValue FROM Questions) WHERE (((Questions.CAT) In ("Topic1")) AND ((Questions.Position)="Manager")) ORDER BY RandomValue) UNION ALL (SELECT TOP 3 * FROM (SELECT *,Rnd(ID) AS RandomValue FROM Questions) WHERE...
  18. Guus2005

    Solved Help with a union query

    Check your ((parenthesis) I put your query in Notepad++. Which shows corresponding parenthesis. It shows that there are a few of those missing. HTH:D
  19. Guus2005

    Identifier type characters

    No argument there, however variables declared as Dim V$ are not faster than variables declared as Dim V as string!
  20. 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...
Back
Top Bottom