Jon Stelly's Q&A profile
Microsoft ISV Community Center Forums How to loop a macro every 20 minutes
Hello, I need assistance with some code that will run this macro every 20 minutes in an Excel workbook that is constantly open. I think it needs to loop somehow but it is beyond my programming skills. If anyone can point me to the right Method I would greatly appreciate it!! Michael Hello Michael, Play around with the following and you should be able to get the result you need. ChasAA [Code starts] Sub start() ' Put this in your workbook open event Application.OnTime Now + TimeValue("00:00:15"), "runUpdate" ' I have set it for 15 seconds in this example change to "00:20:00" for 20 minutes End Sub Sub runupdate() ' this is where your code for the updating will go ' the following ...Show All
SharePoint Products and Technologies AggregateDataSource and AggregateDataSourceView
Has anyone had a go at using AggregateDataSource or AggregateDataSourceView I'm hoping they can aggregate list data but there is no doco on how to use them and Google reveals nothing. Thanks for any assistance, Alex. Thanks for that 1gin, never would have thought of looking there! If this template does what it appears to, it will be interesting to turn the list aggregation into code using the object model. ...Show All
Visual Studio Team System How do team projects relate to branches?
Our development group would like to be able to use one main branch of code for multiple versions of our software and create branches for hotfixes etc. But we would like to be able to keep work items separate for each version. One question we have is can multiple team projects share one branch of code or do you have to create a new branch when you create a team project From what I'm reading about iterations, it looks like a version of our software can be considered an iteration and work items can be grouped by iterations. So we could have one team project for multiple versions of our software and group the work items by iterations. Is this true We want to use the CMMI process template, by the way. Thanks, Richard ...Show All
Commerce Server Tax Calculations
I am looking for a sample pipeline Component to caculate tax. I don't need very advanced tax calculations just 3 states with a flat tax and all my products are taxable. Any assistance would be greatly appreciated. Hi there, while we don't have a tax component sample the SDK includes a sample pipeline component implementation. You can use this sample as a starting point in providing your tax calculation logic. At the very basic level, you would need to get the state code from a dictionary item that is passed into the pipeline component, and then run a branching logic to calculate the specific state tax. Hope this helps! Thanks, Caesar. ...Show All
Smart Device Development Is .NET Compact Framework 2.0 supports Generics?
Hi guys, I got this exception at run time after i deployed my application, System.MissingMethodException was unhandled Message: Could not load type 'System.Collections.Generic.Dictionary`2' from assembly 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=969DB8053D3322AC'. There is no design-time error, and I'm using the .NET Compact Framework 2.0 SP1. Thanks in advance. Hiya I can use this line: System.Collections.Generic. Dictionary < string , string > d = new Dictionary < string , string >(); on my device, so generics er supported. Maybe you should try to re-deploy the .net framework on your device Best Regards ...Show All
Visual Studio Express Editions Help in disabling Alt+f4 in my vb 2005 express application
Can anyone help me disable the Alt+f4 keys for my application. I'm using vb 2005 express. Your help will be much appreciated. Tnks. not sure this will work but worth a shot. Implement the keydown event and check to see if the Alt key has been pressed as well as the Keys.F4. if e.Alt = true AND e.Keys = Keys.F4 then e.Handled = true end if now in order for the user to close the application correctly say from a close button, the above method may not work quite so well. What you could do as an alternative is to place a bool value globally to indicate if the user pressed the close button, if so, then only then can they close the application. So... 'declare globally: Dim IsToExitAp ...Show All
Visual C# HOW DO I: Insert on a table, using tableadapter?
Hi, I guess my subject said a lot of my problem, but anyways i will try to explain it. this is it: Im new at this c# stuff, so i was tryin' to insert a row, into a two colums table. after tryin' with the DataRow Class, I got to the "tableAdapter.insert" method. it worked once... but I could'nt commit the changes.. not even using the AceptChanges method. anyways you get my point... anybody can help Actually this answare seemed to me very helpful, with only one problem.. the Sqlcommand stuff, i cant find it nither as a DataType or a class. is there anything wrong with my IDE ...Show All
Visual Studio 2008 (Pre-release) A New Windows Application, WPF or Forms?
Hi I plan on starting a new Windows Desktop project soon and I will surely want some places to be WPF, but the majority of the forms will be Windows Forms 2.0. Is there any advantage / disadvantage for me using a WPF application type (template) instead of a Windows Forms Application template from VS 2005, or because the majority of the application will be windows forms am I better off using the current Windows Forms template for the project Cheers miloush wrote: If you start the project in Windows Forms template, I cannot imagine how should you manage to compile the WPF stuff. Maybe it's also simple, but this is my point of view, hope it helps a little bit. ...Show All
SQL Server SQLEXPRESS instance on SQL SErver 2005 standard edition
What happens when you install a SQLEXPRESS instance on a machine that already has SQL Server 2005 Will the SQLEXPRESS still run in the limited mode or will it sense that an full standard version of SQL Server 2005 is already present and just "upgrade" itself On the otherhand, how do I "upgade" an existing instance of SQLEXPRESS to a full version of SQL Server 2005 standard edition without uninstalling and installing the standard edition. If I have both the instances then will the SQLEXPRESS be freed from its limits Thanks, Vikram I've got a question related to this topic. I've got one box that had a trial version of SQL Server 2k5 Standard on it and found out that the software ...Show All
Smart Device Development SDK sample 'Back' Errors
Hi, The sample Back (sdkback.exe) have an Edit box in the dialog box, if you press Action key when the focus is on the edit box, the app is exit. I'm writing an handler to response an action key when user press in Edit ctrl. But it always exit. I spy the Dialog box which is the parent of the Edit control, see when Action key pressed, Edit send an WM_COMMAND to it's parent. the WPARAM is 1, which is equal to IDOK, then app exit. So maybe, SDK sample should be more strictly doing a demo. And I was wondering how to understand this resource as a menu: IDR_BACK_MENUBAR RCDATA MOVEABLE PURE BEGIN 0x0000, 0x0001, 0xfffe, 0x0001, 0x0004, 0x0010, 0x0066, 0x0000, 0xffff END Thanks, Eric ...Show All
Visual C# How do I programmatically shutdown the computer?
How do I programmatically shutdown the computer after waiting for 3 seconds and use a timer to countdown you cant tell how many seconds are left in the timer. the timer is always active until you disable or stop it. it will keep ticking until you stop it. one way would be to create a global variable of your "secondsLeft", set it to the starting number of seconds left, then on the timer tick event, subtract 1 from it then update the label, and finally if secondsLeft is 0 then execute and stop timer private int secondsLeft = 3; .. .. //timer tick (interval = 1000) if (this.secondsLeft == 0) { this.theTimer.Stop(); //execute shutdown } else { this.theLabel.Text = "seconds left ...Show All
SQL Server Matrix grouped by Day Part and Date
I am wondering has anybody ever created a Matrix in a report grouped by Day Part (10-2 Morn, 2-6 Aft, 6-10 Eve etc) and Date I would like to see a report with an output such as 13/02/2006 14/02/2006 Total Morn Aft Eve Morn Aft Eve Mr A 2 4 5 2 6 2 21 Miss B 8 8 1 1 4 5 27 I have a DB table which records the datetime each time a viewer changes TV channel. The report is a summary by user of each channel change By Day Part with Each Date I can do this easily enough by just grouping on Date but now require another level of detail. ...Show All
Windows Forms How to extract a form from a project
Hi there, Does anyone know if a class exists to capture the same info now wrapped in "InitializeComponent()". I want to capture all form details for a given form at design time (properties and controls) but I can't find anyway to do it. Note that reading a form's ".resx" files won't do either since it's only good for localized forms but in any case, it doesn't always provide complete info. Thanks very much. you can try out lutz roeder's reflector tool to disassemble your assembly. it also has builtin support for reading designonly properties set to be persisted as embedded resource for your form. ...Show All
Visual Basic listbox items
How can program a list box so that when a certain item is inputed the font color changes Rather amazingly, it seems that adding an item (or range of items) to a listbox only triggers the Format event on the Listbox, so you could put some in that event to check whether the new e.ListItem is one that causes a colorchange. But the more amazing thing, is that removing an item(s) from the listbox does not seem to trigger any event at all! I'm telling you that, because it means you'll have add a textcheck yourself after removing an item (as opposed to putting your code in an event's Sub). So you might as well use the same textcheck code after adding Items too, instead of putting it seperately in the Format event. The example below gives you tw ...Show All
Visual C# C++ code to C#
I spend few hours trying to rewrite one code which is about 100 lines long... There are using memcpy, memset and etc in C++ code, maybe someone could help me to make it work .. I am just beginner in C# and C++.... Just write replay here or e-mail (my e-mail: cybaslt@hotmail.com) Why not compile your C++ as Managed C++ and then use a decompiler (like reflector http://www.aisto.com/roeder/dotnet/ ) to show the code as c#, then cut+paste. I used this technique for quite a while when I was learning c# and it gave a good insight into the differences between .NET languages. Neil ...Show All
