Solved

Appending one number to another (& Operator??)

Posted on 2002-03-30
3
132 Views
Last Modified: 2010-05-02
My senario....
on Sheet3 I have cells filled in from A1 to A200
I want to copy Cell A1 from Sheet3 to range ("I9") on sheet1.
At the same time an Inputbox would come up asking the user to enter their job no.
the value of the inputbox would append itself to the front of Cell A1 on Sheet3 and copy it to Range (I9") on Sheet1.
example....
Number in Range ("A1") on sheet3 = Y600
the user would type in the inputbox the number 9999
I want the end result on Sheet1 Range ("I9") to read  9999-Y600 (is it also possible to get the "-" in there too?)
 Or if the user enters 8888 in the inputbox the end result would be 8888-Y600.
the rest of the macro returns back to sheet3 and deletes row 1 so this same number (Y600) cannot be used again and then returns to sheet1 for saving.

Thank you
0
Comment
Question by:He4Giv
  • 2
3 Comments
 
LVL 44

Accepted Solution

by:
bruintje earned 50 total points
ID: 6907788
Hi He4Giv,

There's an excel forum for these questions although it looks a lot like an assignment?

Public Sub GetNewJobNumber()
Dim strJob As String
  strJob = InputBox("Enter job number")
  Worksheets("Sheet1").Range("I9") = strJob & "-" & Worksheets("Sheet3").Range("A1")
  Worksheets("Sheet3").Range("A1:A1").Delete
  Rem don't know if this is neccessary
  ActiveWorkbook.Save
End Sub

HTH:O)Bruintje

PS not tested but i'll leave that up to you ;)
0
 

Author Comment

by:He4Giv
ID: 6907901
This works Great!!
Thanks

PS...Where is the Excel Forum?
Email me at He4Giv@AOL.COM
0
 
LVL 44

Expert Comment

by:bruintje
ID: 6907908
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question