W
wagee
Obviously new to VBA....worked my finger to the bone getting my first
VBA program to run. Decided to make it an addin for distribution and
of-course am now having all kinds of problems getting the code to run.
Seems I am refering to workbooks a lot now<ng>
Dummie = MsgBox(msg, vbYesNo + vbExclamation, "Setting Units")
Select Case Dummie
Case vbYes
Workbooks("test-
macro19.xla").Sheets("mike").Range("A15").Value = True
DefaultUnits1.Show
Workbooks("test-
macro19.xla").Sheets("mike").Range("A15").Value = False
End Select
Got that to work but how do I reference named ranges? For instance
this code is from DefaultUnits1 called above:
With DefaultUnits1.ListBox1
.RowSource = "DefaultUnitsRange"
.ColumnHeads = True
.ColumnCount = 3
.ListStyle = fmListStylePlain
End With
I cannot get rowsource to read the range no matter what I have tried.
Can someone give me a lesson on what I should know here?
Thanks
Wayne
VBA program to run. Decided to make it an addin for distribution and
of-course am now having all kinds of problems getting the code to run.
Seems I am refering to workbooks a lot now<ng>
Dummie = MsgBox(msg, vbYesNo + vbExclamation, "Setting Units")
Select Case Dummie
Case vbYes
Workbooks("test-
macro19.xla").Sheets("mike").Range("A15").Value = True
DefaultUnits1.Show
Workbooks("test-
macro19.xla").Sheets("mike").Range("A15").Value = False
End Select
Got that to work but how do I reference named ranges? For instance
this code is from DefaultUnits1 called above:
With DefaultUnits1.ListBox1
.RowSource = "DefaultUnitsRange"
.ColumnHeads = True
.ColumnCount = 3
.ListStyle = fmListStylePlain
End With
I cannot get rowsource to read the range no matter what I have tried.
Can someone give me a lesson on what I should know here?
Thanks
Wayne