LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default VBA get range from cell offset

I have a macro that allows pictures to be added to a cell defined as a
range and, as such, takes the range as an input i.e.

Sub InsertPicture(PictureFileName As String, TargetCell As Range, _
CenterH As Boolean, CenterV As Boolean)

However, my main code is using cell offsets in all of the processing
and I am unsure as to how to convert my offset cell to the TargetCell
value required above i.e.

Set fdcCell = FDCs.Cells(fdcrownumber, 1) -- the initial cell
definition

The cell I need to find the range value for is fdcCell.Offset(0, 18)

I guess I have to create a range variable such as "Dim pictRange As
Range"

What is the command to set this pictRange value to that of the cell
defined by offset fdcCell.Offset(0, 18) ??

Cannot get this right!!

Cheers
 
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
Sum variable range of column entries in offset cell Struggling in Sheffield[_2_] New Users to Excel 5 October 10th 09 05:16 PM
Moving into a cell range using Offset and LBound TISR Excel Programming 2 March 26th 06 11:56 PM
Offset Function works in cell, not in named range DragonslayerApps Excel Worksheet Functions 0 July 25th 05 04:39 PM
Selecting a range offset from a cell Beeegr8 Excel Programming 2 April 1st 05 08:02 PM
Selecting cell using range.offset presence76[_3_] Excel Programming 2 June 9th 04 03:46 PM


All times are GMT +1. The time now is 08:35 AM.

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"