Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 148
  • Last Modified:

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
0
Murray Brown
Asked:
Murray Brown
  • 4
1 Solution
 
Wayne Taylor (webtubbs)Commented:
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
 
Ashish PatelCommented:
It should be like this
= xlRange.Range("A" & RowNum).End(Excel.XlDirection.xlToRight).Column
0
 
Wayne Taylor (webtubbs)Commented:
Can you please explain how the selected response differs from the one I suggested 2 minutes beforehand?
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Wayne Taylor (webtubbs)Commented:
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)Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now