Visual Basic Development Bookmark and Share   
 Home > Visual Basic Language > Copy the inputbox value to specified position in another sheet
 

Copy the inputbox value to specified position in another sheet

Hi,

imabsolutely new with VB and i guess this is very easybut for me still complicated task. I wanna copy the value from inputbox tonext empty row in the another sheet. I cant overcome the problem with type mismatch. So far i gotthis

Dim NC as Range
Dim CR, MyNym As String


MyNum = Application.InputBox("Enter an order number", Type:=2)
Set NC = Sheets("Sheet1").Cells(Cells.Rows.Count, Columns("A").Column).End(xlUp).Offset(1, 0)
Set CR = MyNum

CR.copy
NC.PasteSpecial (xlValues)
Application.CutCopyMode = False

I tried to change the data types to everything but wont work, any suggestions

thank u

Michal222  Wednesday, January 28, 2009 1:11 AM
HiMichal222

Welcome toVisual Basic General forum,
This forum is for VB.NET questions only (e.g. Visual Basic 2003, Visual Basic 2005, Visual Basic 2008).

Sticky: For Visual Basic 6 questions, please read...

Sticky: For VBA, Office (VSTO), Macros and VBScript Questions


For VBA (Visual Basic for Applications), Macros or Excel Questions, you will get better support in the VBA Forum:
Visual Basic for Applications (VBA)
http://forums.microsoft.com/msdn/ShowForum.aspx?ForumID=74&SiteID=1

For developing add-ins for Office 2003 or 2007 products:
Visual Studio Tools for Office
http://forums.microsoft.com/msdn/ShowForum.aspx?ForumID=16&SiteID=1

For VBScript questions, search for a variety of resources or try:
VBScript Forums
http://www.visualbasicscript.com/ (A Non-Microsoft Site)

Best Regards
Xingwei Hu


Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Xingwei Hu  Monday, February 02, 2009 7:11 AM

You can use google to search for other answers

Custom Search

More Threads

• CHecking/unchecking all checkboxes in gridview
• Is it possible to initialize an indefinite (eg. Decimal) array without setting boundaries on the array length?
• How to automatically expand label's width from both sides?
• As _ AppDomain in Property and Method Statements
• Using Tool Tips in VB .net 2005
• vb and outlook
• Access2003- Multiple Parameter Search in a Form
• Reading .RM Files
• VB and Dll variables
• How-to create a help/info file from a class method/properties/functions?