Using visual Studio 2005 programming in visual basic.
I have one module and two forms. The program launches the setupform, which
sets global variables in the mainmodule. After completion it hands control to mainmod.
The second form (monitor) now needs to be shown and is updated every minute.
The program runs 24/7, but there has to be a way to stop it, which is done by a checkbox on the monitor form.
The problem is I cannot control the forms from the module.
Following is some code from the module:
' global variables
Dim FMXL As Excel.Application
Dim FMWbook As Workbook
Dim FMWSheet As Worksheet
Dim FMMon1 As New System.Windows.Forms.Form
Dim FMSet1 As New System.Windows.Forms.Form
FMSet1.Name = "SetupForm"
FMMon1.Name = "MonitorForm"
The problem is, it is not complaining about the syntax, but FMMon1.show show a completely blank form, not the monitor form I have created.
Also there is a public subroutine in MonitorForm, but is does not show up in FMMon1.
In addition I cannot close or unload the setupform
So we are obviously not connected.
Can you tell me what is wrong or missing.
Another thing I have a problem with is to set the location of the monitor form. There are 5 radio buttons on the form sending the form top left, centre etc
However to set location pointer with X & Y coordinates escapes me.
I do a lot of programming in VBA and I find this visual studio very tedious & frustrating.
For example I cannot use Range(Cells(1,1),Cells(5,2000)).Select
Nor can it understand EntireColumn etc etc
and I have not tried ActiveCell.offset, but probably not. (I have not seen it in intellisence)
Can anybody "open a door here"?
Can somebody help?