[Webinar] Streamline your web hosting managementRegister Today

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

Part 2 to the question in the URL :

Please go here to see the question :

http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_21335618.html

Then my next part to this question is :

Will that code work with cell references that are larger then ie 1 letter and a few digits, ie cell ref # AA145 or EV364 ?? If not , then what do I need to do to alter the code so its simmiliar to that so it will work ?

Thanks and kind regards :)

Gecko
0
gecko_au2003
Asked:
gecko_au2003
  • 3
  • 2
1 Solution
 
vinnyd79Commented:

Will this work?

Dim temp1, temp2, temp4

x = 0
temp1 = ""
While Not IsNumeric(Right(temp1, 1))
    x = x + 1
    temp1 = Mid(txtName.ControlSource, 1, x)
Wend

x = x - 1
temp1 = Left(temp1, x)

temp2 = Val(Mid(txtName.ControlSource, x + 1)) + 1
temp4 = temp1 & temp2 'Concatenation of temp1 and temp2 to create new cell refernce to move to
txtName.ControlSource = temp4
0
 
gecko_au2003Author Commented:
I will give it a go later on, I have stuff to do today but will post back later on with regards to how it went. Thanks vinnyd79
0
 
Harisha M GCommented:
gecko I think you won't accept anything other than the one in your mind :(
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
gecko_au2003Author Commented:
It works to go to the next cell reference but what would I have to do in order to make it go to previous cells ? Then you got yourself the points !!
0
 
vinnyd79Commented:
Try to  subtract  instead of add  to temp2

temp2 = Val(Mid(txtName.ControlSource, x + 1)) - 1
0
 
gecko_au2003Author Commented:
ok thanks :)
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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