• WSLeighW

    WSLeighW

    @wsleighw

    Viewing 11 replies - 181 through 191 (of 191 total)
    Author
    Replies
    • in reply to: Paintshop Pro V7 – Memory problems #541956

      Thanks for all the suggestions… Regrettably, I have tried all and none have worked.

      And then I stumbled across a solution that is simplicity in itself.

      For ages I have just been clicking on the OK button when WMF file’s ‘Meta Picture Import’ dialog box appeared. Today, I thought what if I changed the pixel sizes to smaller values?

      Original file was 4996 H by 6962 W and I experimented with different settings and finally opened the file when the height had dropped to 32% of its original settings (from 4996 pels down to 1600 pels).

      The good part was that the file was quite readable whereas Irfan Viewer (which could OPEN the file without problem) was doing a simple translation of the pixel size to a much smaller value and the resulting document was less than readable.

      I feel elated that I was able to ‘stumble across’ such a simple solution but I thank everybody for their efforts in trying to resolve this. (Special thanks to Ian and Mary.)

      I hope this can be of use to others that have had the same problem.

      Leigh

    • in reply to: Paintshop Pro V7 – Memory problems #541505

      Thanks for your suggestions…

      Tried using RAM Idle application to ‘free up’ memory but no change in problem. Can open larger .WMF files (4-5mb) without error message but some (smaller) files that were created in PSP refuse to open in the same application. Even if you create the document, close it, and then try to open from MRU list.

      The system has 512mb of PC133 SDRAM and monitoring it shows that there is at least 400mb of RAM available, but still PSP refuses to open the file.

      Have tried Irfan Viewer to check file as has Ian and I can open it without problem although the filter must be decidely different as it is hard to read the open document.

      Thanks, if I find a solution it WILL be posted in the Lounge.

    • in reply to: Paintshop Pro V7 – Memory problems #540189

      Thanks for your response Ian, but we might have a problem posting the attachment here as Eileen has a limit of 100kb. The file I want you to see is 4.2mb but zips to 174kb.

      The file was converted by PSP from a TIF to WMF and edited in PSP but cannot be opened by the same application. Strange!

      Later: Tried but unable to attach the file because of size. Please contact me.

      TIA Leigh

    • in reply to: Default File Location (VBA/XL97+) #536856

      I have solved the problem…

      I had been referencing a new default path in the code that I posted to the forum. It wasn’t until I saw it there that I realised that the path was being set.

      ‘Application.DefaultFilePath = “ServerName” & FilePath’

      Thanks for your assistance.

    • in reply to: Logo and the top of the first page only (Visual Basic) #536850

      You might consider this, Kerrie, as a simple solution without the need for code.

      I did a similar thing for a client with their FAX.

      I created the template (single page) with the logo in the header. I then set up the headers to be different first page. (File | Page Setup | Layout tab | Different first page option).

      Then I added a second page and made sure that the logo was not showing by first checking that the two headers were not linked. (View | Header and Footer and making sure that ‘Same as previous’ was greyed out.).

      Then I removed the second page and tried it out. MS Word had retained the information about the first page header even though there was only one page in the Fax template. And the logo appeared only once on the first page. I also set up different sizes for the two headers which was remembered in the one page Fax template, thankfully!

      HTH, Leigh

    • in reply to: Default File Location (VBA/XL97+) #536845

      Thanks, Andrew

      I already had used your suggestion to define the path to their location of the server-based data files. (It uses their workstation name to derive a known location for where they can ‘see’ their data files). See the public function code and the snippet from the main macro below for that.

      Public Function GetComputerNames() As String
      Dim lpBuffer As String * 20
      Dim Length As Long ‘MID(text,start_num,num_chars)
      Length = GetComputerName(lpBuffer, Len(lpBuffer))

      ‘Save Location & Department names for later use
      LocationName = Mid(lpBuffer, 2, 3)
      DepartmentName = Mid(lpBuffer, 5, 2)
      End Function

      GetComputerNames
      ‘Open relevant CSV file
      Dim FilePath As String
      FilePath = LocationName & DepartmentName & “QUA”
      ‘Specify the correct file server name before running macro
      ChDir “ServerName” & FilePath
      Application.DefaultFilePath = “ServerName” & FilePath
      Application.Dialogs(xlDialogOpen).Show “ServerName” & FilePath & “*.csv”
      fNamePath = Application.DefaultFilePath & “”

      I wanted to persist with ‘Application.DefaultFilePath’ in some form so that I did not have to worry about what ‘ChDir’ and ‘CurDir’ were doing, except where I could use them to my satisfaction.

      I am no closer to resolving this, any further suggestions?

    • in reply to: Default File Location (VBA/XL97+) #536835

      Thanks Andrew.

      I am not sure how to use this so that the initial default file location is ‘captured’ , the user plays to their heart’s content saving files in any other location and then the macro is to return the default file location to how it was before the macro ran.

      Would you expand on your advice a little please?

      TIA, Leigh

    • in reply to: Custom Time Function (MS XL97-2002) #536503

      Thanks Andrew.

      I wasn’t on the right path but that is just what I needed.

      Leigh

    • in reply to: While You Were Out (Versions that support it) #528541

      Arrgh, why is this an inconsistent feature of the software?

      I don’t believe this should be classed as a custom form and I reckon it’s envelope icon should act like any of the others. Users become confused if there are inconsistencies in the way applications (and their features) behave.

      Further, I was hoping that some Lounger may have the answer in the form of VBA code to ‘modify’ the form (and the action of the envelope icon) to act like the standard templates in Outlook.

      But thanks for your reply…

    • in reply to: VBE Windows #516825

      Thanks for your response Charlotte, but I had tried that. My problem is that the Project Explorer window becomes docked at the top of the available space (below the toolbars) and no settings changes seem to fix it.

      It happened before and I seem to think that you responded last time (thanks once more) but that was on the old Lounge and I can’t find any reference to it that I saved here.

      I just want the windows for Project Explorer and Properties to dock on the left hand side as per the standard layout.

      I can post a screen capture if it would help.

      Any further suggestions?

    • in reply to: Convert Text to Numbers Macro #511336

      Hi Acerf

      I located the following macro about six months ago and I gather it does what you are after I think.

      I apologise to the author as I seem to have lost the details but someone from the Lounge might recognise it and set me straight.

      “This macro has a nasty habit of deleting any number tested if it is >999,999”

      “Sub NumberToWords()
      Dim Number As Long
      Dim Words As String
      Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
      If IsNumeric(Selection) Then
      Number = CLng(Selection)
      Select Case Number
      Case 0
      Words = “Zero”
      Case 1 To 999999
      Words = SetThousands(Number)
      Case Else
      MsgBox “Number too large!”, vbExclamation, “NumberToWords Macro”
      End Select
      Else
      MsgBox “No number to left of insertion point!”, _
      vbExclamation, “NumberToWords Macro”
      End If
      Selection = Words
      End Sub

      Private Function SetOnes(ByVal Number As Integer) As String
      Dim OnesArray(9) As String
      OnesArray(1) = “One”
      OnesArray(2) = “Two”
      OnesArray(3) = “Three”
      OnesArray(4) = “Four”
      OnesArray(5) = “Five”
      OnesArray(6) = “Six”
      OnesArray(7) = “Seven”
      OnesArray(8) = “Eight”
      OnesArray(9) = “Nine”
      SetOnes = OnesArray(Number)
      End Function

      Private Function SetTens(ByVal Number As Integer) As String
      Dim TensArray(9) As String
      TensArray(1) = “Ten”
      TensArray(2) = “Twenty”
      TensArray(3) = “Thirty”
      TensArray(4) = “Fourty”
      TensArray(5) = “Fifty”
      TensArray(6) = “Sixty”
      TensArray(7) = “Seventy”
      TensArray(8) = “Eighty”
      TensArray(9) = “Ninety”
      Dim TeensArray(9) As String
      TeensArray(1) = “Eleven”
      TeensArray(2) = “Twelve”
      TeensArray(3) = “Thirteen”
      TeensArray(4) = “Fourteen”
      TeensArray(5) = “Fifteen”
      TeensArray(6) = “Sixteen”
      TeensArray(7) = “Seventeen”
      TeensArray(8) = “Eighteen”
      TeensArray(9) = “Nineteen”
      Dim tmpInt1 As Integer
      Dim tmpInt2 As Integer
      Dim tmpString As String
      tmpInt1 = Int(Number / 10)
      tmpInt2 = Int(Number Mod 10)
      tmpString = TensArray(tmpInt1)
      If (tmpInt1 = 1 And tmpInt2 > 0) Then
      tmpString = TeensArray(tmpInt2)
      Else
      If (tmpInt1 > 1 And tmpInt2 > 0) Then
      tmpString = tmpString + ” ” + SetOnes(tmpInt2)
      End If
      End If
      SetTens = tmpString
      End Function

      Private Function SetHundreds(ByVal Number As Integer) As String
      Dim tmpInt1 As Integer
      Dim tmpInt2 As Integer
      Dim tmpString As String
      tmpInt1 = Int(Number / 100)
      tmpInt2 = Int(Number Mod 100)
      If tmpInt1 > 0 Then tmpString = SetOnes(tmpInt1) + ” Hundred”
      If tmpInt2 > 0 Then
      If tmpString > “” Then tmpString = tmpString + ” ”
      If tmpInt2 9 Then tmpString = tmpString + SetTens(tmpInt2)
      End If
      SetHundreds = tmpString
      End Function

      Private Function SetThousands(ByVal Number As Long) As String
      Dim tmpInt1 As Integer
      Dim tmpInt2 As Integer
      Dim tmpString As String
      tmpInt1 = Int(Number / 1000)
      tmpInt2 = Int(Number Mod 1000)
      If tmpInt1 > 0 Then tmpString = SetHundreds(tmpInt1) + ” Thousand”
      If tmpInt2 > 0 Then
      If tmpString > “” Then tmpString = tmpString + ” ”
      tmpString = tmpString + SetHundreds(tmpInt2)
      End If
      SetThousands = tmpString
      End Function”

      Remove quotes from code (only added to indicate original author’s text and code) before testing.

      Whilst I haven’t run Andrew’s response, the code he shows is leaner than the above. Both lots of code refer to numbers less that 1 million – is this a VBA limit I wonder?

      Leigh

    Viewing 11 replies - 181 through 191 (of 191 total)