• WSBrooke

    WSBrooke

    @wsbrooke

    Viewing 15 replies - 496 through 510 (of 543 total)
    Author
    Replies
    • in reply to: Mock that App #519698

      So the following code will work then:

      Private Sub Workbook_Open()

      Dim xlApp As New Excel.Application
      Set xlApp = CreateObject(“Excel.Application”)

      With xlApp
      .Visible = True
      .Workbooks.Open FileName:=”C:Docs and SetsBrookeMy Docsrevenue.xls” ‘or similar
      End With

      End Sub

      However, I’ve got a sneaking suspicion that I got it horribly (and embarrassingly!) wrong with all that malarky about instances and which one a workbook gets opened in – it now looks to me as though they just get opened in the last instance you visited. Which means that there’s no point in opening a new instance. I shall have another look at that later on just to make sure, unless anyone else knows more about ‘instance precedents?’

      Brooke

    • in reply to: Mock that App #519601

      Drk,

      Try putting this code in a word document (or any controller application) and run it.

      Sub Start_Mock_That_App()

      Dim XLObja As Object
      Set XLObja = CreateObject(“Excel.Application”)

      With XLObja
      .Visible = True
      .Workbooks.Open FileName:= “C:Docs and SetsBrookeMy DocsMock_That_App.xls” ‘or similar
      .Workbooks.add
      End With

      Dim XLObjb As Object
      Set XLObjb = CreateObject(“Excel.Application”)

      With XLObjb
      .Visible = True
      .Workbooks.add
      End With

      application.quit

      End Sub

      a) the user is opening a word document (put it in auto_open (?)) – even less likely to think your app has anything to do with excel(?)

      you need two instances otherwise when your user opens an excel file through explorer it will try to open in the first instance.

      c) this means that you don’t have to put code in the deactivate/activate events of Mock_That_App, which as Legare pointed out is a right pain to get right – and cuts down on redisplay time

      d) you do still need code to change the first excel instance’s appearence in the open and close events of Mock_That_App though.

      e)it may be possible to do an if…getobject(excel)….then 2apps = true before the first createobject and then put if 2apps then… around the second createobject

      f) in case you’re wondering about how e) affects …….

      ===> if I have no excel instances open and programmatically open one instance, manually opening a spreadsheet from explorer opens it in that instance.
      ===> if I have no excel instances open and programmatically open two instances, manually opening a spreadsheet from explorer opens it the last (programatically) opened instance.
      ===> if I have one excel instance open (manually opened) and programmatically open one instance, manually opening a spreadsheet from explorer opens it in the manually opened instance.
      ===> if I have two excel instances open (both manually opened) and programmatically open one instance, manually opening a spreadsheet from explorer opens it in the most recently opened – manually – instance.

      I have tested this on my works laptop – not thoroughly but a few times. It seems to hold true.

      g)like Legare, I couldn’t get Excel to programatically start a new instance of itself. But I have had an idea. It goes like this… from excel, start word and open a document that has code in it’s auto open macro… hey! we could play this game all night!

      h) the upshot? you’re slowly getting close to what you want but whether you’ll ever get there, well…

      Brooke

    • in reply to: Compile this #519458

      Either Geoff’s invisible or he’s gone home.

      try this – i think it’s right…

      c:program filescommon filesmicrosoft sharedvbaVBEEXT1.OLB

      Brooke

    • in reply to: Mock that App #519449

      Sorry old chap,

      I could have sworn I had the code to do this. Can’t find it anywhere.

      From memory you dim excel.app as new app – as you would for starting any other office app from excel – and go from there. How you define which instance new spreadsheets go to is temporarily (permanently?) beyond me.

      I must admit to a small amount of surprise that no-one else has come back on this one. Hans? Legare? Moderators? Anyone?

      Brooke

    • in reply to: Flow Charting Software #519440

      For simple stuff I’ve always used excel (97) – how does it compare to this – is it worth the hassle of an extra program?

      Brooke

    • in reply to: Dead System #519298

      Well, I tried three power supplies to no avail, had a look at the switch, still nothing, put it back together with the original power supply, checked it, same symptoms, and took the rest of the afternoon off.

      Got back in an hour ago and pressed the power switch for the hell of it…. it powered up perfectly. I’ve done quite a few hard restarts since and it seems that about one in ten start-ups succeed. Once the box ‘catches’ everything seems fine, everything working perfectly.

      It would seem that something is on the way out, but I guess I’ll just have to wait until it becomes terminal to find out what, though I’m going to replace the power switch anyway as i figure that’s not going to be too expensive and is the most likely culprit.

      In the meantime my backups will become a little more frequent – the last one was only a fortnight ago as it happens but that is pure luck: the one previous to that was taken last year.

      If I ever get to definately locate the problem I’ll let you know what it is/was but in the meantime thanks for all the advice.

      Brooke

    • in reply to: Dead System #519074

      My life’s on that hard-drive! What’s the smilie for blind panic? I’m off home to see when I last took a backup.

      Brooke

    • in reply to: Dead System #518993

      I’ll have a look at that tonight. Wish me luck….

      Brooke

    • in reply to: Dead System #518986

      Are you saying you’re not going to nip round and fix it for me? I’ve tried two spare power supplies and i get exactly the same symptoms(i.e. none). I’ve now replaced the original, though I’m not 100% sure why, and rechecked all the leads. Nothing. Maybe it’s time for professional help… And no – I didn’t take any part of the system into the shower.

      Brooke

    • in reply to: Disappearing buttons #1780184

      I’m under the impression that default toolbars are not machine specific but machine/user specific – I believe this to be the case for windows 95/98/ME. Is it possible that when the toolbar reverts to default the user has logged onto windows by a different name from which the modified toolbars were set up?

      Brooke

    • in reply to: XP Screen Shot Software #1780143

      Fair Point. You get the whole screen.

      Brooke

    • in reply to: XP Screen Shot Software #1780137

      You can. Use the mouse to activate the dropdown but don’t lift your finger off the button. Press printscreen now and the menu won’t disappear.

      Brooke

    • in reply to: Graphics Association – Word2K #518613

      Sorry about that – I found the cover disc. What I’m using is called ACDSee from http://www.acdsystems.com – the version I use is not what’s on offer there now, but, based on my experience with whatever version is on my home system, I would recommend taking the free trial and seeing what you think . The file size is a little larger than I expected though – i might try upgrading, but I’ll do the download whilst I’m at work.

      Brooke

    • in reply to: Graphics Association – Word2K #518597

      I’m sure it was available for some time on cover disc in the uk. I would have a look to check that it is acd, but I’ve got a few problems with the home system. However, I’ll see whether I’ve still got the disc – if I have there should be more info on that.

      Brooke

    • in reply to: Dead System #518570

      I’m not sure I’d go as far as saying that I know what I’m doing, but I do know a few of the things not to do…

      Thanks for the advice – I’ll try swapping the psu over and hopefully that’ll fix it.

      Brooke

    Viewing 15 replies - 496 through 510 (of 543 total)