That cracked it ~ simple when you know how. Thank you JHB. In case anyone later wants this solution here is the updated (working) code;
Option Explicit
Public fDate As Date
Public vField, vFile As String
Public vLeeWay As Integer
__________________________
Code within a...
Not quite Mike.
I have a public variable vField.
In a procedure I assign the name of a form control (a text box) which is called "txt_gts_data" to vField
I then call the Sub form_open_data and pass that form control name as vField
1 Private Sub form_open_data(vField, vFile)
2 fDate =...
I look at a lot of files to see when they were last updated.
I wanted to write a generic procedure to manage that so …..
Public fDate As Variant
Public vField As String
Public vFile As String
'GTSdata
vField = "txt_gts_data"
vFile = "c:\gtsdata\gts_data.txt"
Call...