Posts by Denis

    The young lady that upgraded my OS yesterday decided that I should download and re-install all of the company software that she wiped out with the upgrade.


    What exactly are we paying her for? I might as well have done the OS upgrade myself if I'm having to reinstall the standard desktop plus the few extras that I had.

    I'm scheduled for WinXP assimilation in work next week. I use this at home. I have no problems with the cartoon feel, but I have problems with simple stuff like the Windows File/Search feature trying to overdo stuff. It will be nice to have access to the USB ports.


    As bad as M$ are for bringing out a new version of Office every year or two, one they are pretty good at is backwards compatability. (this might change after Office 2003, but so far so good)


    Will, thanks for reminding me to backup my add-ins. I'd have forgotten about those.

    That's like a less flexible idea than the shortcut strips that you used to get with BBC Electron programs. You would put a strip of commands that fit over the Function keys and it would tell you what that function button would do. e.g. cut/copy/paste were the popular commands for the Word Processor app.

    I know the first post had an example of code for illustration purposes, but you would probably get a speed increase if you used <font color=blue&gt;Long</font&gt; integers rather than short <font color=blue&gt;Integer</font&gt;.

    As I recall, this was not too tricky to do from MATLAB. However, it has been about 5 years since I touched MATLAB, so my best suggestion to you is this:


    Have a look at the following .m file available for download here:


    http://www.mathworks.com/matla…ctId=2855&objectType=file


    Export your data to Excel and then create a graph in Excel of your data.


    One thing puzzles me though, I recall that MATLAB had quite a nice graphing capability, why do you need to export to Excel? I also recall that there were a number of options as to how you wanted to export MATLAB's graphs, including the ability to export them as Windows Metafiles, which made automated reports incredibly easy.

    Such a tool would be a file repository. The idea is that it is like a public library, only it uses computer files rather than books.


    The benefits of using this type of system, other than storing you files in one place (which you could just as easily do in a regular folder) is that these systems also incorporate a version control system. i.e. if you modify a file, the repository will note and store the changes. If you really screw up a piece of code while you're working on it, then you can easily revert back to the last working version without having to eat up so much disk space as having a complete copy of the code.


    Visual SourceSafe is one tool that M$ has created for this purpose.


    I believe it comes with the Developer version of M$ Office. I believe it also comes as standard with M$ Visual Studio.


    A "free" alternative would be tkCVS. There is quite a community that supports tkCVS these days at it might not be too painful try to use that.

    Here's a quick example. I created a comment in Cell A1 on Sheet1. I have created the object variable "objComment" to hole the comment.


    Code
    Public Sub main()
      Dim objComment As Comment
      
      Set objComment = Sheets("Sheet1").Range("A1").Comment
      MsgBox objComment.Text
    End Sub

    Thanks NoFlag. It still doesn't work though. Perhaps it was my mistake by choosing a flag and then changing back to "not specified". I'll just choose a cool flag and say I'm from there. I don't know where "Hu" or "Hn" but I'm willing to see if they've got good flags. Hopefully one of those is Hungary.

    Is that another UK born moderator? It looks like a pattern is emerging. Bias? ;)


    Just kidding.


    BTW Why is the American flag next to my name when I have "not specified" in my profile?

    You already have a workable solution, but I just thought I'd add that it would be just as easy to use the SheetBeforeDoubleClick event in the Workbook object. i.e. in "ThisWorbook" you will find the event:


    Code
    Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
    
    
    End Sub


    This may produce a more maintainable solution. e.g. maybe not in your specific example, but if you had a workbook with 20 sheets that had identical doubleclick code that needed modified, this would be a pain to maintain.

    Here's a quick example to count JPG files based on an example in VBA help for the "Files" property:



    The code actually throws up a message box that names all of the files as well as gives you the count of the jpg files. I modified it to suit your needs, but left some superfluous stuff like listing the files for illustration purposes.


    I hope this gets you started.

    I don't receive spam since my spamfilter is set to only receive from people I trust. :D


    Isn't the Dialing code +31 used for the Netherlands? The Brits don't use Euros, yet. :)

    [quoteI do however have 2 other questions...
    1. Might someone know how I can enlarge the image to fill out the image control...and
    2. What syntax would I use to clear the picture from the control if an image is not available for an item?
    [/quote]




    1. In the VBE, select your image control and look at properties. There is a property called "PictureSizeMode". Play with the options there. Pick whichever you like best.
    2. Based upon my example, something like:



    ....would work. Error trapping is only one easy way to do it.