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. right click and refresh

right click and refresh

Scheduled Pinned Locked Moved Visual Basic
helpjsontutorialquestionannouncement
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.
  • I Offline
    I Offline
    Ian 0
    wrote on last edited by
    #1

    Hi, I am using input boxes to enter data into a spreadsheet. But my problem is that if the user makes an error then they can't go back. This is partly because after the user has input the data my code puts their data into variable and then does various calculations with it before putting the result into defined cells. Does anyone know how I could put in a user update if they right click the cell where they have made an error? The new data would then have to be refrshed through the rest of the code. Heres an example of some of the code Private Sub Workbook_Open() Dim mydate As Date Dim baldate As Date Dim duedate As Date Dim todate As Date Dim TheDate As Date ' Declare variables. Dim Msg Dim hey Dim Ms Dim instal Dim instmon Dim mon mydate = Date ActiveSheet.Cells(15, 1).Value = mydate rentac = Application.InputBox(Prompt:="Enter rent account number", Default:="1234567", Type:=1) tenant = Application.InputBox(Prompt:="Enter name of tenant", Default:="Tenant", Type:=2) adda = Application.InputBox(Prompt:="Enter house no and street, eg 1 Walnut Street", Default:="1 Walnut Street", Type:=2) addb = Application.InputBox(Prompt:="Enter name of Town, eg Prudhoe", Default:="Prudhoe", Type:=2) AddEx = Application.InputBox(Prompt:="Enter additional address lines, eg Hexham", Default:="Prudhoe", Type:=2) addc = Application.InputBox(Prompt:="Enter name of County, eg Northumberland", Default:="Northumberland", Type:=2) addd = Application.InputBox(Prompt:="Enter postcode, eg NE42 123", Default:="NE42 123") bal = Application.InputBox(Prompt:="Enter opening balance", Default:="100.0", Type:=1) baldate = Application.InputBox(Prompt:="Enter date at which balance applies", Default:="17-06-01", Type:=1) duedate = Application.InputBox(Prompt:="Enter first charge date eg usually Monday coming ", Default:="18-06-01", Type:=1) todate = Application.InputBox(Prompt:="Enter last charge date if different from end of year ", Default:="31-03-02", Type:=1) rent = Application.InputBox(Prompt:="Enter weekly rent", Default:="45.00", Type:=1) ActiveSheet.Cells(13, 1).Value = "Ref" & rentac ActiveSheet.Cells(81, 2).Value = rentac ActiveSheet.Cells(17, 1).Value = "Dear " & tenant ActiveSheet.Cells(51, 1).Value = tenant ActiveSheet.Cells(52, 1).Value = adda ActiveSheet.Cells(53, 1).Value = addb ActiveSheet.Cells(54, 1).Value = AddEx ActiveSheet.Cells(55, 1).Value = addc ActiveSheet.Cells(56, 1).Value = addd ActiveSheet.Cells(25, 2).Value = baldate ActiveSheet.Cells(25, 8).Value

    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