Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Assigning a variable a value from a Cell in VBA

I'm having a little difficulty assigning a variable the value of a cell
in a different worksheet. I hope that makes sense. Here is what I'm
trying to accomplish.

pack = "=Package!R[4]C[2]"

I want the value that is in the cell referenced to be stored in the
variable pack. Whenever I run this it stores "=Package!R[4]C[2]" as
what is in pack. I'm new to writing Macro's in VBA so if this seems
trivial please forgive me.

Thanks,
Jeff

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Assigning a variable a value from a Cell in VBA

Thanks for the reply Dave,
I tried the command you gave me and I get the following error when
running.

Run-time error '438':

Object doesn't support this property or method.

I think that Package is the object correct. Just as an fyi I'm using
Excel 2000 and VBA 6.0.

Any other ideas?

Thanks,
Jeff

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Assigning a variable a value from a Cell in VBA

I think you're going to have to post the code you used--include the DIM
statements, too.

" wrote:

Thanks for the reply Dave,
I tried the command you gave me and I get the following error when
running.

Run-time error '438':

Object doesn't support this property or method.

I think that Package is the object correct. Just as an fyi I'm using
Excel 2000 and VBA 6.0.

Any other ideas?

Thanks,
Jeff


--

Dave Peterson
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
Assigning values to a variable set John A[_2_] Excel Discussion (Misc queries) 1 April 23rd 10 08:20 PM
Assigning a variable Zack Excel Worksheet Functions 3 December 11th 08 07:00 PM
Assigning a row to a variable Todd Excel Programming 4 June 10th 04 06:49 PM
assigning worksheet variable Simon Shaw[_4_] Excel Programming 4 May 29th 04 04:04 AM
Re-assigning the value of a variable for a for loop from Mike Berry Excel Programming 1 July 16th 03 02:41 PM


All times are GMT +1. The time now is 11:56 PM.

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

About Us

"It's about Microsoft Excel"