Closed henryhodgson closed 5 months ago
Sub AutofillUploadDataForm_Sheet1() With UploadDataForm .cbDatabases.Text = "DATABASE" .cbSchemas.value = "SCHEMA" .cbTables.Text = "TABLE" .tbMergeKeys.Text = "A,B,C" End With End Sub
Sub MasterAutofillUploadDataForm() Select Case ActiveSheet.name Case "Sheet1" AutofillUploadDataForm_Sheet1 Case Else MsgBox "Unknown sheet: " & ActiveSheet.name End Select
End Sub
Sub ShowUploadDataForm() UploadDataForm.Show End Sub
and calling Call MasterAutofillUploadDataForm in Public Sub UserForm_Initialize() has got this working
Hi,
I have a project with seven worksheets, each of which has a single table on it. I want to create a button for each worksheet which autofills the Upload Data box: Schema, Table and Table Key Columns. I cannot find the VBA code to do this.
Please could you help with this?
Henry