Run-time error '1004': Method 'Range' of object '_Global' failed

G

Guest

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?
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top