Search : in
By :

Active row range from sheet1 to sheet2

nfc883, on Aug 7, 2008 5:18:05 pm BST 
 Report this message to moderators

Hello,
This may be one of those totally simple things, but I'm teaching myself vba and have been pounding on this problem for days.

In short, sheet2 has a series of graphs that pull data from sheet1 and this all works fine if I set the exact data ranges in my code. But I want to have the data range be columns I through N in the row that contains the active cell on sheet1. I think I have the right idea, but can't seem to make it work.

I have tried many different ways. For instance:

Setting the data series in the first chart using ActiveCell:

.SeriesCollection(1).Values = Worksheets("Sheet1").Range(Cells(ActiveCell.Row, 9), Cells(ActiveCell.Row, 16))

or setting variables:

Dim ar As String ' active row from sheet1
Dim rngData As Range ' Range of user data to be used from sheet1

ar = ActiveCell.Row
Set rngData = Worksheets("Sheet1).Range(Cells(ar, 9), Cells(ar, 16))


or this:

Dim RowNum As Integer ' Active row from sheet 1
Set RowNum = Worksheets("Sheet1").Cells(ActiveCell.Row)

I'm such a beginner! Any ideas?

Best answers for « active row range from sheet1 to sheet2 » in :
Activate Volume Control in the taskbar ShowActivate Volume Control in the taskbar It may happen that after some configurations on your computer system, the icon volume control on your task bar disappears. Below is an indication how to recover same. The first step is to go...
Activate Windows XP ShowActivate Windows XP To determine if your version of Windows is activated or windows reminds you to activate the system (normally windows must be activate 30 days after installation). So to activate Windows manually just click on...
Activation key for Avast Home Edition ShowActivation key for Avast Home Edition Application The anti-virus AVAST Home Edition is free which however requires a free activation key valid for one year to perform. Application Click on below link: http://www.avast.com/fre/home...
Download Active Phone Server ShowDescription The application is designed by SoftCab, Inc. So far this application is well known worldwide for its perfection. It has won awards in certain places and it is being used by companies also. Active Phone Server is an application based on...
Download Active Wallpaper Changer ShowDescription The application is designed by ABF software, Inc. Active WallPaper Changer is a tool that enables you to create a calendar. Simple and easy to use, the application has been awarded from various popular places. The application enables you...