Consulting

Results 1 to 4 of 4

Thread: Input box and sheet

  1. #1

    Input box and sheet

    Hello everyone,
    I am working on an excel vba project and i need help with something

    right now i have two inputbox and its value is stored in variable FirstAnchor and LastAnchor
    and i have another sheet which has few numbers stored in a row

    now if user enters 3 in firstanchor and 10 in second anchor i just want to add the values that are present in A3 to A10 from that another sheet

  2. #2
    VBAX Guru mancubus's Avatar
    Joined
    Dec 2010
    Location
    "Where I lay my head is home" :D
    Posts
    2,644
    hi,

    pls elaborate your requirement; post your code, or even better, your workbook.
    PLS DO NOT PM; OPEN A THREAD INSTEAD!!!

    1) Posting Code
    [CODE]PasteYourCodeHere[/CODE]
    (or paste your code, select it, click # button)

    2) Uploading File(s)
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    Replace company specific / sensitive / confidential data. Include so many rows and sheets etc in the uploaded workbook to enable the helpers visualize the data and table structure. Helpers do not need the entire workbook.

    3) Testing the Codes
    always back up your files before testing the codes.

    4) Marking the Thread as Solved
    from Thread Tools (on the top right corner, above the first message)

  3. #3
    This is my code where i described first anchor point and last anchor point and this code is for sheet("manualInput")
    Dim VarFirstAnchor As Integer
    VarFirstAnchor = Application.InputBox("Please enter initial Anchor Point", "Initial Anchor Point ", 1)
    Range("A21").Value = "First Anchor Point"
    Range("B21").Value = Int(VarFirstAnchor)

    And TemporarySheet is another sheet where a series of number entered by user is stored in Column A

    like say user entered 20 different number and he entered 5 in first anchor point and 10 in second anchor point so i want to add numbers from 5 to 10 that user entered.


    Dim VarLastAnchor As Integer
    VarLastAnchor = Application.InputBox("Please enter Last Anchor Point", "Last Anchor Point ", 1)
    Range("A23").Value = "Last Anchor Point"
    Range("B23").Value = Int(VarLastAnchor)

  4. #4
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    try:
    Sheets("Temporary Sheet").Range("A" & VarFirstAnchor & ":A" & VarLastAnchor).Copy Range("A25")
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •