Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Run-time error '1004': Method 'Range' of object '_Global' failed

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Run-time error '1004': Method 'Range' of object '_Global' fail

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Run-time error '1004': Method 'Range' of object '_Global' fail

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
runtime error 1004 method range of object '_global failed valdesd Excel Discussion (Misc queries) 2 October 6th 05 07:26 PM
<Method 'Range' of object '_Global' failed error Ken Loomis Excel Programming 2 October 12th 04 01:29 PM
Runtime Error 1004 - Method Range of '_Global failed' Sworkhard Excel Programming 3 July 9th 04 04:20 AM
Error 1004: Method 'Cells' of object '_Global' failed LT Excel Programming 2 October 31st 03 04:47 PM
"Run-time error '1004'" Method 'Range' of object '_global' failed. haisat[_2_] Excel Programming 0 October 20th 03 12:13 PM


All times are GMT +1. The time now is 10:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"