Author Topic: "Run-Time error '9': Subscript out of range" Need help!  (Read 30598 times)

0 Members and 1 Guest are viewing this topic.

Offline Jack

"Run-Time error '9': Subscript out of range" Need help!
« on: October 05, 2007, 03:11:18 pm »
If you have a solution or a suggestion to why this might be happening would be great, thanks!  

Offline Aurora

"Run-Time error '9': Subscript out of range" Need help!
« Reply #1 on: October 05, 2007, 03:16:07 pm »
googled it and got this


SYMPTOMS
When you attempt to copy a Microsoft Visual Basic for Applications module sheet in a Visual Basic macro procedure, you may receive the following error message:
Run-time error '9':
Subscript out of range
Back to the top

CAUSE
This problem may occur if the following conditions are true: • You are using the Copy method of the Sheets collection to copy a Visual Basic module sheet. Your line of code may be similar to the following:ThisWorkbook.Sheets("Module2").Copy before:=ActiveWorkbook.Sheets(1)
               
 
• The module sheet that you are trying to copy was inserted manually in Microsoft Excel.

Back to the top

WORKAROUND
Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please visit the following Microsoft Web site:
https://partner.microsoft.com/global/30000104 (https://partner.microsoft.com/global/30000104)
For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:
http://support.microsoft.com/default.aspx?...;EN-US;CNTACTMS (http://support.microsoft.com/default.aspx?scid=fh;en-us;cntactms)
The following sample macro illustrates how to copy the contents of a module to a new code module contained in another workbook. This example assumes that you have a workbook open that contains two modules. 1. Start the Visual Basic Editor (press ALT+F11).
2. If Project Explorer is not visible, press CTRL+R to activate Project Explorer.
3. Click to select the Visual Basic project that contains the module sheet that you want to copy.
4. On the Tools menu, click References. Click to select the Microsoft Visual Basic for Applications Extensibility 5.3 check box, and then click OK.
5. Click Module on the Insert menu.
6. Type the following code into the module sheet:   Sub CopyModule()
      Dim CodeLines As String
      Dim ModuleToCopy As VBComponent
      Dim NewModule As VBComponent

      ' Set a variable to the module to copy.
      ' Note: This assumes that the name of the module to copy is
      ' "module2". Replace "Module2" with the name of the module to copy.
      Set ModuleToCopy = _
             Application.VBE.ActiveVBProject.VBComponents("module2")

      ' Get the Visual Basic code from the module.
      CodeLines = ModuleToCopy.CodeModule.Lines _
                 (1, ModuleToCopy.CodeModule.CountOfLines)

      ' Create a module sheet in another workbook.
      ' Note: You must refer to the name of the Visual Basic project. By
      ' default, the name of all new projects is "VBAProject". You may want
      ' to rename the project to which you are copying the contents of the
      ' module sheet.
      Set NewModule = Application.VBE.VBProjects("VBAProject") _
                      .VBComponents.Add(vbext_ct_StdModule)

      ' Add the Visual Basic code to the new module.
      NewModule.CodeModule.AddFromString CodeLines

      ' Rename the new module to the name of the previous module.
      NewModule.Name = ModuleToCopy.Name

   End Sub
               
 
7. Run the CopyModule procedure.
Excel will insert a new module sheet into the Visual Basic project named VBAProject, and will copy the code from the module named Module2 in the active Visual Basic project.

For additional information about manual insertion of modules, click the article number below to view the article in the Microsoft Knowledge Base:
213726 (http://support.microsoft.com/kb/213726/EN-US/) XL97: Modules Inserted Manually Are Not in Modules Collection
-RPGWO-
VRZ Staff - Staff - Xerxes - lvl 28 - Retired
Aurora - Mage - Asylum - lvl 37 - Retired
Borealis - Mage - Pyramid - lvl 23 - Retired
Borealis - Mage - Claytonia - lvl 15 - Retired
Aurora - Mage - Phantasy - lvl 7 - Retired
-League of Legends-
Auronon

Offline Jack

"Run-Time error '9': Subscript out of range" Need help!
« Reply #2 on: October 05, 2007, 03:18:17 pm »
Well, I am trying to run my own RPGWO server, this has nothing to do with excel spreedsheets.  It started when I used the "Add Content" button.

Offline Aurora

"Run-Time error '9': Subscript out of range" Need help!
« Reply #3 on: October 05, 2007, 03:32:51 pm »
maybe it part of the coding uses excel or something
-RPGWO-
VRZ Staff - Staff - Xerxes - lvl 28 - Retired
Aurora - Mage - Asylum - lvl 37 - Retired
Borealis - Mage - Pyramid - lvl 23 - Retired
Borealis - Mage - Claytonia - lvl 15 - Retired
Aurora - Mage - Phantasy - lvl 7 - Retired
-League of Legends-
Auronon

Offline Daegan

"Run-Time error '9': Subscript out of range" Need help!
« Reply #4 on: October 05, 2007, 04:25:18 pm »
turn off your firewall
let the updater finish completly

FOR THE LOVE OF GOD DON'T CLICK ME
IT is 10% planning and 90% trying to fix everything that didn’t go as planned.



Offline Jack

"Run-Time error '9': Subscript out of range" Need help!
« Reply #5 on: October 05, 2007, 04:40:43 pm »
Quote from: Daegan
turn off your firewall
let the updater finish completly

I will try this, but I don't really know if this will work.  I first got this error after I used the "Add Content" button to add trees etc.  I was able to get in before and walk around the empty map.

Offline Light Elf

"Run-Time error '9': Subscript out of range" Need help!
« Reply #6 on: October 05, 2007, 05:36:37 pm »
This is the ultimate Solution.

DO NOT TRY TO RUN ROGUE SERVERS IF YOU NEED TO PUBLICLY ASK FOR HELP FROM PPL YOU DONT EVEN KNOW!!!!

Offline Daegan

"Run-Time error '9': Subscript out of range" Need help!
« Reply #7 on: October 05, 2007, 05:38:28 pm »
Quote from: Jack
I will try this, but I don't really know if this will work.  I first got this error after I used the "Add Content" button to add trees etc.  I was able to get in before and walk around the empty map.
Try doing what I tigering told you before you come here and shoot it down or give your reasons on why it wont work. I don't waste my time explaining how to do something if it will fail.

KTHXBAI

FOR THE LOVE OF GOD DON'T CLICK ME
IT is 10% planning and 90% trying to fix everything that didn’t go as planned.



Offline Jack

"Run-Time error '9': Subscript out of range" Need help!
« Reply #8 on: October 05, 2007, 05:49:29 pm »
Quote from: Daegan
Try doing what I tigering told you before you come here and shoot it down or give your reasons on why it wont work. I don't waste my time explaining how to do something if it will fail.

KTHXBAI


Ok.. I just said that I didn't think it would work because that wasn't what was making the error come up, it was a different part of the logging in process.  Also, it didn't work, do you have any other ideas?

Quote from: Light Elf
This is the ultimate Solution.

DO NOT TRY TO RUN ROGUE SERVERS IF YOU NEED TO PUBLICLY ASK FOR HELP FROM PPL YOU DONT EVEN KNOW!!!!

Then how did the first "rogue" server get started?  I doubt he spent a year figuring it out...  how about you post something helpful to me instead of complaining that I need help, no one is perfect and I don't see why this is such a terrible thing to ask for.
« Last Edit: October 05, 2007, 05:52:14 pm by Jack »

Offline Malekith

"Run-Time error '9': Subscript out of range" Need help!
« Reply #9 on: October 05, 2007, 06:50:22 pm »
I thinjk the first rogue was actually run by an ex admin that knew the code back to front n stuff actually so never asked for help...
"Never argue with a stupid person. First they'll drag you down to their level, then they will beat you with experience."

"When tempted to fight fire with fire, remember that the Fire Department usually uses water."

"Some minds are like concrete, thouroughly mixed up and permanently set."

"Treat everyone with politeness, even those who are rude to you, not because they are nice, but because you are."

Offline STNeo

"Run-Time error '9': Subscript out of range" Need help!
« Reply #10 on: October 08, 2007, 02:05:11 am »
Jack,

The best solution would be to re-write the entire game.

I have asked a VB expert friend before whether it's possible to follow the crap source from the VB decompiler to do up the server source. His conclusion, re-write another server. Every person's got a style, very much like writing a book. No 2 writers are the same. You want the same exact server Mick has? Ask him for it.

Even if you want to live with the existing crap server (without the enhancements that the LEGAL servers are enjoying) and create a world, it's limitations are simply the fact that you have to spend time to code the inis. Most of us have a life outside of RPGWO and expect to spend many years just trying to code this damn game. It's not worth the time, effort or the money to eventually host, manage and run this game for a buncha peeps who dun appreciate all you do just becos' you are running a Rogue Server.

Some of us have the financial resources, other have the will. People like me, well, like the idea and eventually will work with a MMORPG company to incorporate RPGWO concept in. Maybe, JUST maybe, we'll let mick have a small share in it.

~cheers~

Offline Daegan

"Run-Time error '9': Subscript out of range" Need help!
« Reply #11 on: October 08, 2007, 02:41:47 am »
Quote from: STNeo
Jack,

The best solution would be to re-write the entire game.

I have asked a VB expert friend before whether it's possible to follow the crap source from the VB decompiler to do up the server source. His conclusion, re-write another server. Every person's got a style, very much like writing a book. No 2 writers are the same. You want the same exact server Mick has? Ask him for it.

Even if you want to live with the existing crap server (without the enhancements that the LEGAL servers are enjoying) and create a world, it's limitations are simply the fact that you have to spend time to code the inis. Most of us have a life outside of RPGWO and expect to spend many years just trying to code this damn game. It's not worth the time, effort or the money to eventually host, manage and run this game for a buncha peeps who dun appreciate all you do just becos' you are running a Rogue Server.

Some of us have the financial resources, other have the will. People like me, well, like the idea and eventually will work with a MMORPG company to incorporate RPGWO concept in. Maybe, JUST maybe, we'll let mick have a small share in it.

~cheers~
This reply seems somewhat intelligent, up to the end part anyhow.

Let me start by saying that he hasn't coded anything. He got a link to a pirated server download somewhere and doesnt know what he's doing, don't make it seem like he's doing something grand here.

As far as the error goes, the problem lies with the updater as I've gotten this error before, it's either a firewall blocking the program, or the games not fully updated. It's an easy fix if you aren't a tigerwit about it.

FOR THE LOVE OF GOD DON'T CLICK ME
IT is 10% planning and 90% trying to fix everything that didn’t go as planned.



Offline Brendan

"Run-Time error '9': Subscript out of range" Need help!
« Reply #12 on: October 08, 2007, 02:51:33 am »
Also, the servers that we have ARE the real server's just not used with permission. I have the server mickey gave grinch to run oceanic. There are no "enhancements" mickey just coded a turtle looking server it seems. If he wanted n00bs to use it he would have built popup instructions into the server.

Go ask mickey for help, or ask UT. I have his MSN, I just prefer to keep on his good side so I won't give you it. Ask Guin, she may give you it though.

Offline STNeo

"Run-Time error '9': Subscript out of range" Need help!
« Reply #13 on: October 08, 2007, 03:18:37 am »
Opps, forgot to answer the question. Jack, The problem lies with your updater. You must have downloaded the "Updater for Noobs" given by @@@Admin Jon. DO NOT USE IT. I have read the code, it's stooopid. Works the first time and then..boom! Poof~ !@#$%. Explodes like a damn firecracker (ok, i'm joking).ONLY 2 servers distributed have been found working. 1. Muffin's offical server and 2. ermm...forgotton who, is it damen? The other 115.zipMuffin's server is a working server but has some funny error about the animation. the other server also works but the underside.ini and waterside.ini are missing from the zip. Just copy and paste Muffin's underside and waterside .ini and viola! You have a working combined server! I like Tai Lung's Item.ini editor. It's cool.Ermm..lemme see, if you need to code an Autoupdater.exe (use a hex editor and change the link)Before you do that, remember the Master Maker. Can't remember which post has the master maker (the file name is pmmastermaker.exe i think).~cheers
Quote from: Daegan
This reply seems somewhat intelligent, up to the end part anyhow. Let me start by saying that he hasn't coded anything. He got a link to a pirated server download somewhere and doesnt know what he's doing, don't make it seem like he's doing something grand here.As far as the error goes, the problem lies with the updater as I've gotten this error before, it's either a firewall blocking the program, or the games not fully updated. It's an easy fix if you aren't a tigerwit about it.
Quote from: Damen
Also, the servers that we have ARE the real server's just not used with permission. I have the server mickey gave grinch to run oceanic. There are no "enhancements" mickey just coded a turtle looking server it seems. If he wanted n00bs to use it he would have built popup instructions into the server.Go ask mickey for help, or ask UT. I have his MSN, I just prefer to keep on his good side so I won't give you it. Ask Guin, she may give you it though.
HI Damen, Will Guin really give a working copy of the server?If there are no enhancements, then how does Mickey sets the server to update hourly. How does the world re-set daily and at a specific time?The currently distributed servers seem to lack these features. Anyhowz, thanks :)Have a blessed day guys~

Offline Brendan

"Run-Time error '9': Subscript out of range" Need help!
« Reply #14 on: October 08, 2007, 06:58:23 am »
I said, Guin may give you UT's email address :|

Offline Mistress

"Run-Time error '9': Subscript out of range" Need help!
« Reply #15 on: October 08, 2007, 07:43:59 am »
I promised I wouldn't give out my copy of the server so don't ask me... If you want UT's email addy go on one of his worlds and try to ask him for it.
I saw Elvis!!! He sat between me and Bigfoot on the UFO.

Offline Brendan

"Run-Time error '9': Subscript out of range" Need help!
« Reply #16 on: October 08, 2007, 07:53:17 am »
Quote from: Mistress
I promised I wouldn't give out my copy of the server so don't ask me... If you want UT's email addy go on one of his worlds and try to ask him for it.

Once again, I meant for them to ask you for his email address. Not for a copy of the servar.

Offline Mistress

"Run-Time error '9': Subscript out of range" Need help!
« Reply #17 on: October 08, 2007, 08:16:41 am »
I know Damen, no worries
I saw Elvis!!! He sat between me and Bigfoot on the UFO.

 

Related Topics

  Subject / Started by Replies Last post
10 Replies
2432 Views
Last post April 29, 2008, 04:10:16 pm
by RaP DoOd 138
"Stealth Room"

Started by Faran « 1 2 » RPGWO Chat

27 Replies
4931 Views
Last post January 12, 2006, 04:34:42 pm
by Pirate Wings
5 Replies
2673 Views
Last post November 19, 2009, 05:40:29 pm
by Kalose
3 Replies
1621 Views
Last post May 22, 2012, 07:45:56 am
by Novibear
7 Replies
3557 Views
Last post February 05, 2017, 11:31:15 am
by Sacrifice