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
  1. Home
  2. General Programming
  3. Visual Basic
  4. Drawing circles in excel from a form :((

Drawing circles in excel from a form :((

Scheduled Pinned Locked Moved Visual Basic
graphicshelplounge
1 Posts 1 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    I have a class which keeps track of a few circles and draws them in a row using Worksheet.Shapes.AddShape I was quite happily calling member functions and running them from a module with no problems. Then I tried to implement a form to take input (how many circles, size, position etc) and pass it to the class and have it drawn. I just used a handful of TextBox controls. A button is used to copy all the textbox values when pressed, and pass each to the class. Everything worked as before, except that the first circle in the row will never be drawn. The other circles will be drawn in exactly the right position as if there had been a first circle, but instead there is a blank space. I have isolated the variable which is passed to the class which causes the problem - it is the x position on the sheet. I have used the locals window to check what value is passed to .AddShape and it is exactly the right value of 400. Yet the circle never appears. Change the button function to call 400 instead of taking the same value from the form, and it is back again. I have tried passing the variable by value which I would have thought would make the two cases indistinguisable to .AddShape. No luck. I have checked pretty thoroughly that the circle is not just being drawn in the wrong place or somewhere else. So I give up. Any suggestions would be greatly appreciated, even/especially the general debugging approach you might use for something like this (bear in mind I am a certified newbie....) Thanks

    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