Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help Please: Syntax Problem


Hello everyone,

I'm quite new with VB; I've had experience with other programmin
languages though.

For this line:

Dim UniqueCount As Integer
UniqueCount = "=ROWS(R5C1:R" & LastRow2 & "C1)"

I know that I cannot automatically assign UniqueCount the value of tha
formula. How would I format the line such that I can indeed assig
UniqueCount the row value of that line? Thank you in advance

--
Obliviou
-----------------------------------------------------------------------
Oblivious's Profile: http://www.excelforum.com/member.php...fo&userid=3504
View this thread: http://www.excelforum.com/showthread.php?threadid=54787

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Help Please: Syntax Problem

Hey - welcome to the fun.

You can access most of the Excel worksheet formulae with
application.worksheetfunction. However, Rows isn't one of them. Fortunately,
VBA has its own equivalent.

UniqueCount = Range("A5:A" & LastRow2).Rows.Count

Jeff

"Oblivious" wrote
in message ...

Hello everyone,

I'm quite new with VB; I've had experience with other programming
languages though.

For this line:

Dim UniqueCount As Integer
UniqueCount = "=ROWS(R5C1:R" & LastRow2 & "C1)"

I know that I cannot automatically assign UniqueCount the value of that
formula. How would I format the line such that I can indeed assign
UniqueCount the row value of that line? Thank you in advance.


--
Oblivious
------------------------------------------------------------------------
Oblivious's Profile:
http://www.excelforum.com/member.php...o&userid=35041
View this thread: http://www.excelforum.com/showthread...hreadid=547877



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
syntax problem dorre Excel Programming 3 March 20th 06 05:20 PM
Syntax problem unknowndevice[_4_] Excel Programming 4 August 26th 05 10:57 PM
Syntax problem Alex H Excel Worksheet Functions 1 July 2nd 05 08:23 AM
Another Syntax Problem Sharlene England Excel Programming 2 December 2nd 03 10:04 PM


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