Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by StewartJ

  1. StewartJ

    Record locks survive after user has logged off

    Thank you. I have had exactly this issue with a client today and have passed the suggested solution to their network support to implement.
  2. StewartJ

    Closing an Excel app through VB

    This is a problem with Word as well. Setting your reference to Nothing (or just letting it go out of scope) does not close down the Office application; it just loses your link to it so you are left with an 'orphan' process. In either case, you must issue .Quit first.
  3. StewartJ

    VFP6 Report Confusing £ and $

    Thanks to you both. Mike gets a star because his solution was both simple and IT WORKED!
  4. StewartJ

    VFP6 Report Confusing £ and $

    I have a VFP6 exe incorporating a report including fields in currency format. On my and other NT4 machines, the report prints with £ symbols. On a Win2000 machine it is printing with $. In all cases, all regional/locale settings are English (UK). The exe was compiled with 'Use System...
  5. StewartJ

    Getting Data from Excel to VB

    Sorry if I confused you - forgot to open the worksheet in my code!!
  6. StewartJ

    Excel Reformatting dates

    Many thanks. Isn't Microsoft wonderful?!
  7. StewartJ

    Excel Reformatting dates

    I am using Excel 97 SR-2 on Windows NT4 SP6. System regional settings are English (UK) with short date format of dd/MM/yy and long date format of dd MMMM yyyy. My VB code is : ActiveCell.NumberFormat = "dd/mm/yyyy" ActiveCell.Value = "01/02/2003" This displays as...
  8. StewartJ

    Getting Data from Excel to VB

    objExcel = CREATEOBJECT("Excel.Application") With objExcel.Worksheets(1).UsedRange For intRowNo = 1 TO .Rows.Count varCellValue = .Cells(intRowNo, intColNo).Value Next End With objExcel.Quit Set objExcel = Nothing
  9. StewartJ

    Accessing an object by hWnd

    There are lots. VBAPI.com is a useful reference site with examples of calling the API from VB.
  10. StewartJ

    Storing Word Documents/Images in SQL Server database through VB

    Use an Image data type and populate it using the TextStream object (MicroSoft Scripting RunTime). You need to store the word document in C:\Temp (or somewhere similar) temporarily and then read it as a text stream. Recover it by the reverse process. I have used this for document templates and...
  11. StewartJ

    Getting the name of a server with VB

    Declare Function GetFullPathName Lib "kernel32.dll" Alias "GetFullPathNameA" (ByVal lpFileName As String, ByVal nBufferLength As Long, ByVal lpBuffer As String, ByVal lpFilePart As String) As Long See http://www.vbapi.com for details - this is a very useful guide to calling...
  12. StewartJ

    printing to paper type

    I think this is a printer driver problem. What is your printer. We do this with Canon and Kyocera printers and they stop when a bin runs out.
  13. StewartJ

    Quitting excel but still present in memory...

    It depends what you mean. Variables once declared remain until they go out of scope but it's not worth worrying about that. I would include range objects in the 'variables' category. If you are thinking about API objects such as device contexts, then they will stay around in the same way but...
  14. StewartJ

    wrapping an excel vba app in vb?

    Dim objExcel as Object ' Use late binding to be independent of Excel version objExcel = CreateObject(Excel.Application) With objExcel ...{Your existing VBA code} ... .Quit End With Set objExcel = Nothing
  15. StewartJ

    Opposite of TOP keyword

    I don't think so - but why not just reverse the sort order?

Part and Inventory Search

Back
Top