?
Solved

Appending one number to another (& Operator??)

Posted on 2002-03-30
3
Medium Priority
?
138 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 44

Accepted Solution

by:
bruintje earned 200 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month8 days, 15 hours left to enroll

764 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