Hello,
**Windows 7, Excel/Outlook 2010**
I'm using a Userform in Outlook that will create a new calendar event and code it to a pre-determined category. It works great, but the problem is that I want to roll it out to other users who would have different categories and I'm trying to figure out a way to easily update the label caption.
My idea was to read category names from an Excel sheet and update the label captions accordingly, but I'm not sure how. Do I pull data from Excel to Outlook or can I push the data and reference the Outlook userform in Excel?
Here is as far as I've gotten, but receive an error "Subscript out of range" when I run it. (highlighted in red)
Sub Example()
Dim xlApp As Excel.Application
Dim wb As Excel.Workbook
Dim ws As Excel.Worksheet
Dim rng As Range
Set xlApp = Excel.Application
Set wb = Workbooks("Time Tracking Analyzer.xlsm")
Set ws = wb.Worksheets("Logic")
Set rng = ws.Cells(1, 1)
MsgBox rng.Value
UserForm1.Label1.Caption = "Test"
End Sub
Thanks in advance.
**Windows 7, Excel/Outlook 2010**
I'm using a Userform in Outlook that will create a new calendar event and code it to a pre-determined category. It works great, but the problem is that I want to roll it out to other users who would have different categories and I'm trying to figure out a way to easily update the label caption.
My idea was to read category names from an Excel sheet and update the label captions accordingly, but I'm not sure how. Do I pull data from Excel to Outlook or can I push the data and reference the Outlook userform in Excel?
Here is as far as I've gotten, but receive an error "Subscript out of range" when I run it. (highlighted in red)
Sub Example()
Dim xlApp As Excel.Application
Dim wb As Excel.Workbook
Dim ws As Excel.Worksheet
Dim rng As Range
Set xlApp = Excel.Application
Set wb = Workbooks("Time Tracking Analyzer.xlsm")
Set ws = wb.Worksheets("Logic")
Set rng = ws.Cells(1, 1)
MsgBox rng.Value
UserForm1.Label1.Caption = "Test"
End Sub
Thanks in advance.