Hey guys,
I am working on an application for a monthly sports tournament that I run. There are three workbooks to this application: the Administration workbook, the Bracket workbook, and the Leaderboard workbook. I currently have a dual monitor setup (extended, not clone) with my laptop in front of me and a large TV on the wall for the players to see. In order for the players to see the bracket and the leaderboard, I open excel, then I open the Bracket.xlsm workbook, then the Leaderboard.xlsm workbook, and I drag those to the TV. I then open another instance of excel on my laptop, and open the Administration workbook. This stays on my laptop and the players cannot see it.
Here's what I want it to do:
In less words, the administration workbook controls the other two workbooks. Every time a player reports a win/loss, I enter that into the Administration workbook, and that needs to update both the bracket and the leaderboard, so the players can see it on the TV. So, basically, all the data is in the administration workbook, and the other two serve as displays for that data in a format the players can understand.
Here's my problem:
When I run a macro that is supposed to update the other two workbooks, I get an error: "Runtime Error '9': Subscript out of range." I believe this is because of the seperate instances of Excel. Since Bracket and Leaderboard are in a different instance than Administration, it can't 'see' those other two workbooks. Below is the part of the code that deals with these three workbooks:
Line 8 is the one that is highlighted when the debugger opens. I believe this is due to the seperate instances that I mentioned.
Do you guys have any thoughts about how I could remedy this issue? I thought about trying it in the same instance of Excel, but then I can't display anything on a seperate monitor, and I really don't want the administration tools to be visible to the players! The rest of my code appears to be valid, I just need the connection to the other instance of Excel to go through successfully.
THANK YOU FOR YOUR HELP!!!
-Tom-
I am working on an application for a monthly sports tournament that I run. There are three workbooks to this application: the Administration workbook, the Bracket workbook, and the Leaderboard workbook. I currently have a dual monitor setup (extended, not clone) with my laptop in front of me and a large TV on the wall for the players to see. In order for the players to see the bracket and the leaderboard, I open excel, then I open the Bracket.xlsm workbook, then the Leaderboard.xlsm workbook, and I drag those to the TV. I then open another instance of excel on my laptop, and open the Administration workbook. This stays on my laptop and the players cannot see it.
Here's what I want it to do:
In less words, the administration workbook controls the other two workbooks. Every time a player reports a win/loss, I enter that into the Administration workbook, and that needs to update both the bracket and the leaderboard, so the players can see it on the TV. So, basically, all the data is in the administration workbook, and the other two serve as displays for that data in a format the players can understand.
Here's my problem:
When I run a macro that is supposed to update the other two workbooks, I get an error: "Runtime Error '9': Subscript out of range." I believe this is because of the seperate instances of Excel. Since Bracket and Leaderboard are in a different instance than Administration, it can't 'see' those other two workbooks. Below is the part of the code that deals with these three workbooks:
Code:
Sub FillBracket()
'Define global variables for worksheets used in function
Dim MatchForm As Worksheet
Set MatchForm = Workbooks("16_DE_Administration.xlsm").Worksheets("Report Match")
Dim PlayerDB As Worksheet
Set PlayerDB = Workbooks("16_DE_Administration.xlsm").Worksheets("Player Database")
Dim WBracket As Worksheet
Set WBracket = Workbooks("16_DE_Bracket.xlsm").Worksheets("W Bracket")
Dim LBracket As Worksheet
Set LBracket = Workbooks("16_DE_Bracket.xlsm").Worksheets("L Bracket")
Dim FBracket As Worksheet
Set FBracket = Workbooks("16_DE_Bracket.xlsm").Worksheets("Finals")
Dim Leaderboard As Worksheet
Set Leaderboard = Workbooks("16_DE_Leaderboard.xlsm").Worksheets("Leaderboard")
Line 8 is the one that is highlighted when the debugger opens. I believe this is due to the seperate instances that I mentioned.
Do you guys have any thoughts about how I could remedy this issue? I thought about trying it in the same instance of Excel, but then I can't display anything on a seperate monitor, and I really don't want the administration tools to be visible to the players! The rest of my code appears to be valid, I just need the connection to the other instance of Excel to go through successfully.
THANK YOU FOR YOUR HELP!!!
-Tom-