I am a VBA novice and need a little help
I have a workbook with three sheets. Sheet 1 is the main sheet and contains formulas and formatting (no data). Sheet 2 contains the data that I need to merge with Sheet 1. That data is copied from Sheet 3 which has a connection to an external file...
On last thing I had to say..
To be honest I never used CANCEL either in the past to end a program and I probably have used RETURN more than anything but since it became a topic here and I threw it into some sample code I posted earlier in the thread (not consciously) and someone had issue with...
Thanks Olaf, I guess we can agree to disagree.. CANCEL is not used to return values. RETURN is used for that but at the end or in the middle of a called procedure. This is not a procedure it is a simple linear program that starts and ends within the same file which brings me to repeat what the...
Here is s copy and paste from the VFP help file
CANCEL Command
Ends execution of the current Visual FoxPro program file.
RETURN Command
Returns program control to a calling program.
QUIT Command
Ends the current Visual FoxPro session and returns control to the operating system
Now...
There will also be varying opinions. Not using a command to indicate the end of code IMO is sloppy. If not CANCEL, then RETURN or QUIT or if dealing with forms then the appropriate commands, not just an abrupt end to the code that leaves you wondering Now What? I always document my code even if...
Dan, I wasn't trying to be rude, so if I came across that way I am sorry. I was just trying to solve a problem and not worry so much as to what "looks" right and whether it is "Windows" or not. As for the CANCEL command you mentioned earlier it does what I need which is close the program. If I...
Thanks anyway Dan, BUT I don't care if there is anything like it in Windows (TM) as you put.. I just want it to work and for that matter I can always use the old ? command which is WAY more rudimentary than WINDOW WAIT. OH and there is no form here, just "stuff" as Olaf puts it. It opens some...
I did glance at your code. When I started this little project I did start with a form and the first thing I tried was the gotfocus event. It did not run and I think it did not run because there are no controls defined within the form. I did not think of doing stuff outside of the form because in...
The reason I did not (or could not use a form) is that no matter where I placed the code to automatically update the tables it would not execute. I tried the form Activate, valid, show etc methods and nothing would work. Also this needs to run completely without user input and I could not get a...
It seems that Application.Visible = .F. is available when using forms but again there is no form here. I could just leave the main foxpro window and issue _screen.caption="Whatever" and SET SYSMENU TO. Anyway its just aesthetic and not that important either way but if anyone has a better...
Well it seems that the SCREEN=OFF in the config.fpw (and in the project) prevented the user defined window from being displayed, BUT with without it I get the main foxpro window which I don't want either. I simply want a window that opens when the program runs, updates some tables, displays some...
Hey Olaf, try reading before you assume things. I wanted an EXE WITHOUT a form if you would read. Not only that the ACTIVATE WINDOW "Displays and activates one or more user-defined windows or Visual FoxPro system windows" . This is right from the VFP help. Look it up.
I think you are referring to the simple WAIT command without the WINDOW clause as being a "THIS IS A FOXPRO APPLICATION" type command.. There is nothing wrong with a WAIT WINDOW as it simply displays a message in a window and goes away automatically, but anyway that is not the point. The window...
OK I created a very simple PRG for testing purposes and it runs fine in VFP but when I build an EXE and run it from Windows desktop I only get the WAIT WINDOW messages to show. The defined window is never displayed. Am I missing something?
This is my simplified code
DEFINE WINDOW ptup FROM...
Thanks guys.. I was away for the weekend.. I guess I would like a form to display status and messages but the form does not need to have any controls on it. (No user intervention). I will DEFINE WINDOW and ACTIVATE WINDOW plus do some WAIT WINDOW commands to display status. Thanks again. Will...
I need to build an EXE from a simple PRG. Is there a way to build an application without a form. I need it to run at specific intervals (using windows task scheduler) update some tables and then exit. I have tried doing it with a form and placing the code within different methods. The init...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.