Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Juana Fisher   on Aug 31 In MS Office Category.

  
Question Answered By: Marshall Bryant   on Aug 31

This statement

> Range(0, 1).Select=freq

has several problems.

Range has two forms. The one you want takes a string parameter that
identifies a range. E.g. "A1".

There is also a Cells function that takes a row  number (>= 1), and a column
number or letter, to locate a specific cell.

However, neither of them has the concept "current row".

The active cell  is ActiveCell and you can ask it for its row:
ActiveCell.Row.

Therefore A of the active  row is Cells(ActiveCell.Row, "A") and its value is
Cells(ActiveCell.Row, "A").Value.

But

> Range(0, 1).Select=freq

is trying to put the value in freq into something. Assignment is towards
the left. So

freq = Cells(ActiveCell.Row, "A").Value

I notice that you have used "Select" in your statement. Do you really want
to do this? (Doing a select  will move  the active cell position to that
location.) If all you want is the value of the cell, don't do a select.

Share: 

 

This Question has 4 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Looped VBA to paste special values Or get search suggestion and latest updates.


Tagged: