VS 2005 End Error

Hi

I am getting an error on the code that I am converting from VBA to Visual Studio
= xlRange.Range("A" & RowNum).End(xlToRight).Column
The error is occurring on the xlToRight
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?
 
Ashish PatelConnect With a Mentor Commented:
It should be like this
= xlRange.Range("A" & RowNum).End(Excel.XlDirection.xlToRight).Column
0
 
Wayne Taylor (webtubbs)AstronautCommented:
Hi murbro,

Use this....

    xlRange.Range("A" & RowNum).End(Excel.XlDirection.xlToRight).Column

...or you can create your own constants....

    Public Const xlToRight As Integer = Excel.XlDirection.xlToRight

...and use your original VBA code.

Regards,

Wayne
0
 
Wayne Taylor (webtubbs)AstronautCommented:
Can you please explain how the selected response differs from the one I suggested 2 minutes beforehand?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Wayne Taylor (webtubbs)AstronautCommented:
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Hi

Sorry error on my part. Scrolled down too quickly. Can I reallocate the points
0
 
Wayne Taylor (webtubbs)AstronautCommented:
Yes, you can ask a question in Community Support and ask for the question to be reopened.

http://www.experts-exchange.com/Community_Support/General/
0
All Courses

From novice to tech pro — start learning today.