User Profile
Collapse
-
Thanks cactusdata, several individuals, including you, recommend this same Resource. -
Best Reference?
What is the best, comprehensive Reference for programming Windows Applications in VB.NET. I have experience in programming in general, but not VB.NET. Thanks in advance. -
-
It is actually a lot simpler than you may realize. The following Code will:- Export the Inventory Query to the C:\Test\ Folder and name it Inventory.xls
- Create an Instance of Excel
- Open the previously exported Query and make it visible in Excel
- Change the Worksheet Name to something unique
- Save the Workbook while still keeping it open
Code:Dim appExcel As Excel.Application Dim wb As Excel.Workbook Const conEXPORT_PATH
Leave a comment:
-
Back again, NeoPa. I had some free time, so I ran some Benchmarks Tests comparing both your approach (arbitrarily called the Single Pass Approach) against the Collection Approach. The results weren't exactly what I expected, but here they are:- With each approach, I generated 10,000 Unique, Random Numbers.
- Each approach consisted of 20 Trial Runs.
- For a simple timing mechanism, I used the timeGetTime() API Functrion which returns the number
Leave a comment:
-
Apologies for critiquing your code so harshly, but it does have the value of illustrating that not all approaches are the same.
Don't ever be concerned about that, your criticisms and recommendations are always welcome and appreciated. Oftentimes, I'll replace my approach with yours since it will usually be more efficient and faster, I am definitely receptive to new and better ideas.
What I would like to do, strictly out of...Leave a comment:
-
Hello NeoPa, good to see that an old friend is still around and active. I actually use a Dictionary Object (Microsoft Scripting Runtime) and one of it's critical Properties (Exists) to generate X unique, random numbers between a Low and High Range. Using your example above, the following Code will generate 52 random numbers between 0 and 51. Just a different approach that you may/may not agree with. For the sake of brevity and simplicity, I have...Leave a comment:
-
If the General EMaIL Account (info@abccompany .com) exists in your Accounts Collection, then the following should work (basic Code):
Code:Dim OutApp As Object Dim objAccount As Object Dim objMail As Object Dim intCtr As Integer Set OutApp = CreateObject("Outlook.Application") For intCtr = 1 To OutApp.Session.Accounts.Count If OutApp.Session.Accounts.Item(intCtr) = "info@abccompany.com"
Leave a comment:
-
-
-
Please clarify indicating exactly what is NOT to be duplicated.Leave a comment:
-
Here is the Revision which hopefully contains your requested changes....Leave a comment:
-
First and foremost, I agree wholeheartedly with everything that NeoPa and isladogs have stated in prior Posts. They always have, and always will, provide excellent advice that should always be taken when possible. In the event that you still need to dynamically create Controls on a Form based on the number of Fields in a Table, In have created a Demo for you that should at least point you in the right direction. As you will see, it may be a little...Leave a comment:
-
-
@isladogs:
I executed this Code against every single Form in the Northwind 2007 Sample Database, plus some that I created (40 Forms in all/900+ Controls) with no Errors.
Taking the above into consideration, I would also say that I should be safe with the one-line Statement. See Attached Image as far as to what Controls the Tag Property Applies To:...Leave a comment:
-
@isladogs:
Thanks, but I think that NeoPa was referring to non-Label Controls, all of which will be tested for each Form within the loop. Let's see what he has to say.Leave a comment:
-
@NeoPa:
Any Controls that have no .Tag property will crash in your example :-(
Excellent point, one that I obviously overlooked. One question to you my friend, I executed this Code against every single Form in the Northwind 2007 Sample Database, plus some that I created (40 Forms in all/900+ Controls) with no Errors. How is this so, what have I obviously overlooked?Leave a comment:
-
I created a Sub-Routine for you that will check every single Label in every Form, except the one passed to the Routine for a Tag Value that is also passed to the Routine. If a match, or matches are found, it prints the Form Name, Label Name, and Tag Value to the Immediate Window. This should be more than enough to point you in the right direction.
Code:Public Sub CheckTagValue(strCurrentForm As String, strTag As String) Dim ctl As
Leave a comment:
-
@hansy:
Regarding your mentioning of various Macro Names for each DB, you can simply add a [MacroName] Field to tblDBsToRunMacr os and reference it within the Recordset Loop. There is also the added benefit of not passing a Macro Name to the RunMacro() Procedure.
Code:Public Sub RunMacro() Dim MyDB As DAO.Database Dim rstDBs As DAO.Recordset Dim appAccess As Access.Application Set MyDB = CurrentDb
Leave a comment:
-
..I could try this out but where would I define this code
One possibility would be in the Click() Event of a Command Button.
do macros that i need to run in each of the separate access database be renamed as same name in all ?
Not at all. You could add the Macro Name along with Database Name in tblDBsToRunMacr os. You would then need to pass another Argument (strMacroName As String) to the RunMacr() Sub-Routine and process...Leave a comment:
No activity results to display
Show More
Leave a comment: