Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can you show the code which is causing the error?
Tim "Neild" wrote in message ... i am developing an excel application to run on a network server which uses several userforms. the userforms collect data in variables and then write them to cells in several worksheets. the application works correctly when run on my local workstation but when i try to run it from the network, i get this error message. i have located an article Q213655 relating to this error which suggests using the .Evaluate method in place of the Range.value method however it refers to getting a value from a cell and placing it in a variable value. i have tried to apply the Evaluate method in the opposite direction (ie placing a variable value from the userform into a cell in a worksheet) but i get the same '1004' error message. does anyone have a solution other then avoiding userforms in the network environment? -- Neild |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tim,
thanks for your reply. here is the code that is generating the error: Private Sub SetMarket() Worksheets("Sheet1").Range("E7").Value=MarketName End Sub The value of MarketName is established by the following code: Private Sub OptionButton1_Click() MarketName = "Canada" SetMarket End Sub MarketName is declared at the beginning of the code for the userform as follows: Dim MarketName as String As i mentioned in my question, this works perfectly when i run the project locally. the problem only occurs when i try to run the project on a network server and i have already tried the alternative Evaluate procedure but this did not resolve the error. thanks for any help you can provide. -- Neild "Tim Williams" wrote: Can you show the code which is causing the error? Tim "Neild" wrote in message ... i am developing an excel application to run on a network server which uses several userforms. the userforms collect data in variables and then write them to cells in several worksheets. the application works correctly when run on my local workstation but when i try to run it from the network, i get this error message. i have located an article Q213655 relating to this error which suggests using the .Evaluate method in place of the Range.value method however it refers to getting a value from a cell and placing it in a variable value. i have tried to apply the Evaluate method in the opposite direction (ie placing a variable value from the userform into a cell in a worksheet) but i get the same '1004' error message. does anyone have a solution other then avoiding userforms in the network environment? -- Neild |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe you need to qualify the range reference to include the workbook.
Tim "Neild" wrote in message ... Tim, thanks for your reply. here is the code that is generating the error: Private Sub SetMarket() Worksheets("Sheet1").Range("E7").Value=MarketName End Sub The value of MarketName is established by the following code: Private Sub OptionButton1_Click() MarketName = "Canada" SetMarket End Sub MarketName is declared at the beginning of the code for the userform as follows: Dim MarketName as String As i mentioned in my question, this works perfectly when i run the project locally. the problem only occurs when i try to run the project on a network server and i have already tried the alternative Evaluate procedure but this did not resolve the error. thanks for any help you can provide. -- Neild "Tim Williams" wrote: Can you show the code which is causing the error? Tim "Neild" wrote in message ... i am developing an excel application to run on a network server which uses several userforms. the userforms collect data in variables and then write them to cells in several worksheets. the application works correctly when run on my local workstation but when i try to run it from the network, i get this error message. i have located an article Q213655 relating to this error which suggests using the .Evaluate method in place of the Range.value method however it refers to getting a value from a cell and placing it in a variable value. i have tried to apply the Evaluate method in the opposite direction (ie placing a variable value from the userform into a cell in a worksheet) but i get the same '1004' error message. does anyone have a solution other then avoiding userforms in the network environment? -- Neild |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
runtime error 1004 method range of object '_global failed | Excel Discussion (Misc queries) | |||
<Method 'Range' of object '_Global' failed error | Excel Programming | |||
Runtime Error 1004 - Method Range of '_Global failed' | Excel Programming | |||
Error 1004: Method 'Cells' of object '_Global' failed | Excel Programming | |||
"Run-time error '1004'" Method 'Range' of object '_global' failed. | Excel Programming |