Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() This is the script I have to update a table. I'm getting a run tim error in the highlighted line...please help Sub UpdateTable() Dim rng As Range, cell As Range, rng2 As Range Dim xcol As Double, ycol As Double Worksheets("WorkPage").Select Range("Z5").Select xcol = ActiveCell.Value Range("AA5").Select ycol = ActiveCell.Value With Worksheets("WorkPage") Set rng = .Range(.Cells(6, 26), .Cells(6, 26)) End With For Each cell In rng Worksheets("MinimumBoilingRipple").Range(cell.Offs et(-1, 0).Value cell.Offset(-1, 1).Value).Value = cell.Offset(1, 0).ValueNext End Su -- Tre_coo ----------------------------------------------------------------------- Tre_cool's Profile: http://www.excelforum.com/member.php...fo&userid=2641 View this thread: http://www.excelforum.com/showthread.php?threadid=46716 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Since plain text newsgroup messages don't have "highlights", I'll assume
it's the line just before "End Sub": The Range method syntax you're trying to use requires two range objects as arguments, e.g.: Worksheets("MinimumBoilingRipple").Range(cell.Offs et(-1, 0), _ cell.Offset(-1, 1)).Value = ... Using the Value of the cells returns either numbers or strings, so Range() doesn't know what to do with them. In article , Tre_cool wrote: This is the script I have to update a table. I'm getting a run time error in the highlighted line...please help Sub UpdateTable() Dim rng As Range, cell As Range, rng2 As Range Dim xcol As Double, ycol As Double Worksheets("WorkPage").Select Range("Z5").Select xcol = ActiveCell.Value Range("AA5").Select ycol = ActiveCell.Value With Worksheets("WorkPage") Set rng = .Range(.Cells(6, 26), .Cells(6, 26)) End With For Each cell In rng Worksheets("MinimumBoilingRipple").Range(cell.Offs et(-1, 0).Value, cell.Offset(-1, 1).Value).Value = cell.Offset(1, 0).ValueNext End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() so how can I fix this -- Tre_coo ----------------------------------------------------------------------- Tre_cool's Profile: http://www.excelforum.com/member.php...fo&userid=2641 View this thread: http://www.excelforum.com/showthread.php?threadid=46716 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I gave you an example. If that doesn't help, then you'll need to explain
why that suggestion didn't work, and what you want... In article , Tre_cool wrote: so how can I fix this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Combobox has no arrow, just a line on the right, what's wrong? | Excel Worksheet Functions | |||
What is wrong with this line? | Charts and Charting in Excel | |||
Something wrong in one line of VBA code | Excel Programming | |||
Macro to Paste to specific line, and continue to Paste each time on next row not over | Excel Programming | |||
What's wrong with this line of code? | Excel Programming |