Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Using User-Defined Functions in Cells

Trent,
Just delete the .Select as it achieve nothing, then this will work:
f_GetSeqNumber = r.Offset(0, 1).Value

However, you cannot change a value, so this is not possible from a UDF:
r.Offset(0, 1).Value = r.Offset(0, 1).Value + 1

NickHK

"Trent Argante"
...
NickHK,
It's the

f_GetSeqNumber = r.Offset(0, 1).Value

-AND-
r.Offset(0, 1).Value = r.Offset(0, 1).Value + 1


lines that I need the most.

1. Are these two lines considered as being in the "Excel environment?"

2. Can I get around this by accessing the cells via Activecell?

Trent Argante
[DC.J(510)]

*** Sent via Developersdex http://www.developersdex.com ***



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
User Defined Functions MoTrekker Excel Discussion (Misc queries) 2 November 8th 09 06:36 PM
User Defined Functions - Help Text - Make it Easy for the User Andibevan[_2_] Excel Programming 4 March 17th 05 09:51 AM
User defined functions big t Excel Programming 3 September 29th 04 11:40 AM
User Defined Functions Roy Kirkland Excel Programming 3 September 28th 04 06:06 PM
excel functions and User defined functions Kanan Excel Programming 4 May 20th 04 11:21 PM


All times are GMT +1. The time now is 03:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"