Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default type missmatch on Selection.Offset


Code:
--------------------
Sub DuplicateColumns(iOffset1 As Integer, iOffset2 As Integer)

Selection.Offset(iOffset1 & ", " & iOffset2).Select

End Sub
--------------------


Code:
--------------------
Call DuplicateColumns(0, 3)
--------------------


I am getting type missmatch. What is the correct data type should I be
passing as argument?

Thank you.


--
webby2006
------------------------------------------------------------------------
webby2006's Profile: http://www.excelforum.com/member.php...o&userid=36744
View this thread: http://www.excelforum.com/showthread...hreadid=568268

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default type missmatch on Selection.Offset

Webby,

The comma isn't a string so you don't need quotes around it. So.....

Selection.Offset(iOffset1, iOffset2).Select

....will work.

Best regards

John


"webby2006" wrote
in message ...

Code:
--------------------
Sub DuplicateColumns(iOffset1 As Integer, iOffset2 As Integer)

Selection.Offset(iOffset1 & ", " & iOffset2).Select

End Sub
--------------------


Code:
--------------------
Call DuplicateColumns(0, 3)
--------------------


I am getting type missmatch. What is the correct data type should I be
passing as argument?

Thank you.


--
webby2006
------------------------------------------------------------------------
webby2006's Profile:
http://www.excelforum.com/member.php...o&userid=36744
View this thread: http://www.excelforum.com/showthread...hreadid=568268



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default type missmatch on Selection.Offset


John Wrote:
Webby,

The comma isn't a string so you don't need quotes around it. So.....

Selection.Offset(iOffset1, iOffset2).Select

....will work.

Best regards

John



John,
an insight info I cannot forget, thanks a million.
webby;

--
webby200
-----------------------------------------------------------------------
webby2006's Profile: http://www.excelforum.com/member.php...fo&userid=3674
View this thread: http://www.excelforum.com/showthread.php?threadid=56826

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
Offset Type Lookup Michael Lockwoo Excel Worksheet Functions 3 March 24th 06 01:20 PM
Selection type Martin Stender Excel Programming 2 December 2nd 05 03:22 AM
type of selection if selection is chart Chimanrao Excel Programming 0 November 11th 05 03:44 AM
Object Type of a selection... counting rows in a selection Acid-Sky[_2_] Excel Programming 3 August 23rd 05 09:53 AM
Offset and Range Selection Michael[_28_] Excel Programming 2 March 1st 04 10:43 PM


All times are GMT +1. The time now is 03: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"