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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. RickBorup

    Overwrite existing excel file

    If you're using automation to drive Excel from VFP then it's Excel saving the file, not VFP, which is why SET SAFETY has no bearing on the matter. What you probably want to do is write some VFP code to detect if the destination file already exists and if so then to delete it before telling Excel...
  2. RickBorup

    Report previews ok - but prints from wrong table

    Steve, There is a known bug when you launch a report to preview while a grid has focus, then print the report. See "Printing or previewing Report Form results in incorrect data" at http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q185628. One easy workaround is to take the focus off...
  3. RickBorup

    Dimension or declare array

    The newly added array elements will have initial values of logical False, but the original array element values should not be disturbed when the array is redimensioned. The following code does what I think you're describing and leaves the first set of array elements as is: CREATE TABLE...
  4. RickBorup

    Problem with include file

    You're welcome, Bart. Thanks to you for continuing to provide information until we figured this out. -Rick
  5. RickBorup

    Problem with include file

    Yes, that's correct. Setting the path to the location of the .h file in the prg has no effect on the compiler because the program is compiled before the SET PATH statement in the prg is run. What matters is that the path includes the location of the .h file at compile time, or alternatively that...
  6. RickBorup

    Problem with include file

    OK, now we're getting somewhere. < smile > Here's what's happening: When you select main.prg in the project manager and click the Run button, VFP silently compiles the program but cannot find the #include file if it's not along the current path. When this happens VFP creates an error file with...
  7. RickBorup

    Problem with include file

    Bart, We have to infer a couple of things from what you've posetd. It sounds like start.prg is the main program in an application, and that when you say "the exe-version never complains" you're talking about running the EXE generated by building the project. This makes sense, because building...
  8. RickBorup

    Problem with include file

    Help me understand what you meant when you said In what program did you place this code, and does that program have #INCLUDE myIncludeFile.h in it?
  9. RickBorup

    Problem with include file

    From what you've said, I assume you've defined ccMyConstantVar in myIncludeFile.h with something like #DEFINE ccMyConstantVar "foo" If that's true, then you're getting that error message because ccMyConstantVar is not a variable, it's a defined constant. Defined constants are preprocessor...
  10. RickBorup

    Stop Excel file from opening

    Lee, I may have misunderstood your original post, but I thought what you were trying to accomplish was to create an empty spreadsheet with a specific name in a specific location. The low-level commands I posted (FCREATE and FCLOSE) create a 0-byte file with a .XLS file name extension. When...
  11. RickBorup

    Stop Excel file from opening

    It doesn't, but what is the point of deleting the first row of a newly created worksheet? There is no data in those cells, and even after deleting the row you still have 65,536 rows in the worksheet. Of course, if deleting the first row is a requirement for reasons I don't understand then of...
  12. RickBorup

    Stop Excel file from opening

    Lee, If all you want to do is create a file with a given name and an "xls" extension, you don't need to use Excel at all. Given the time it takes to instantiate the Excel appliation object, it would be faster just to use low level file functions to create and then close the file, like this...
  13. RickBorup

    how to enable page on one form from another

    Try form2.pageframe1.ActivePage = 2
  14. RickBorup

    West-Wind - Hyphens in email addresses

    > Using WWIPStuff... if the recipient has a hyphen in their > email address, the program sending the mail just hangs - > when you issue the sendmail() command. I've seen the WWIPStuff::SendMail() hang if the cRecipient string (the list of e-mail addresses) is not correctly formed. If the...
  15. RickBorup

    Problem with printing 'label-forms' with laser-printer.

    > You are using profesiional printers? Mostly my clients and I use HP LaserJet printers, so yes, I guess you would call them professional-grade printers. > I'm afraid that the now-a-days lowcost HP printers cause the error. Maybe so, but one other thing to check is do you have...
  16. RickBorup

    Problem with printing 'label-forms' with laser-printer.

    Check the properties of your field(s) in the report writer and be sure 'Object Position' is not set to Float and also that 'Stretch with overflow' is unmarked. Also, is there anything in the page header that could stretch with overflow and push the detail down? I doubt the paper is stretching...
  17. RickBorup

    Changing Numeric Data in a Field

    Let's assume the value you're working with is a character data type in VFP and is stored in a variable named lcx. Then if you need a numeric result you can simply do VAL( lcx) / 1000 If you need a character string as the result you can do STR( VAL(lcx)/1000, 10, 3) where 10 is an arbitrary...
  18. RickBorup

    Preventing Appearance of 'Table' Menu

    BROWSE NOMENU
  19. RickBorup

    Viewing a text file within an app

    One way is to create a VFP form for this purpose. Add a property to hold the text of the file you want to display, let's call that property cTextString. Place an editbox on the form and set its ControlSource to thisform.cTextString. Use FILETOSTR to load the value of thisform.cTextString from...
  20. RickBorup

    C000005 error from MonthView control

    >I'm trying to get the selected date value from the MonthView control and get a C000005 error whenever I use the keypress event to try to store the value of the control in a public variable.... Not sure what you're tyring to do in the Keypress event, but you shouldn't need to do anything...

Part and Inventory Search

Back
Top