Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. how to

how to

Scheduled Pinned Locked Moved Visual Basic
tutorialquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Matthew Leggett
    wrote on last edited by
    #1

    Is it possible to do the following and if so how? 1) assign variable a range ie: Range = "A1" 2) perform calculations with the variable ie: NewRange = Range + 1 answer = B1

    V D D 3 Replies Last reply
    0
    • M Matthew Leggett

      Is it possible to do the following and if so how? 1) assign variable a range ie: Range = "A1" 2) perform calculations with the variable ie: NewRange = Range + 1 answer = B1

      V Offline
      V Offline
      Vimalsoft Pty Ltd
      wrote on last edited by
      #2

      NO , You cannot Calculate a String

      Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

      1 Reply Last reply
      0
      • M Matthew Leggett

        Is it possible to do the following and if so how? 1) assign variable a range ie: Range = "A1" 2) perform calculations with the variable ie: NewRange = Range + 1 answer = B1

        D Offline
        D Offline
        dan sh
        wrote on last edited by
        #3

        if the format of your range remains the same, you can get the 'A' out and add one to its ASCII value and then change it back to 'B'. But I am not sure if it helps.

        1 Reply Last reply
        0
        • M Matthew Leggett

          Is it possible to do the following and if so how? 1) assign variable a range ie: Range = "A1" 2) perform calculations with the variable ie: NewRange = Range + 1 answer = B1

          D Offline
          D Offline
          Dalek Dave
          wrote on last edited by
          #4

          I am assuming this is XL. You would do it like this...

          Range("A1").Select
          Offset(0,1).Select

          Of course the (0,1) could be reassigned as variables and called within the Offset method. That way you do the calculation then apply to the Offset and move around like that. Hope that helps.

          ------------------------------------ "I want you to imagine I have a blaster in my hand" - Zaphod Beeblebrox. "You DO have a blaster in your hand" - Freighter Pilot "Yeah, so you don't have to tax your imagination too hard" - Zaphod Beeblebrox

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups