Create a input macro in the next available cell

DcoltTech

New Member
Joined
Feb 6, 2015
Messages
8
Hi there,

I want to create a macro, that inputs a string into the next available cell, in a defined row. So when the next available cell is found, a inputbox appears, the user types in the data, and then the data goes into the active cell.

I currently have this:

Sub Find_Blank_Row()
Dim QtyInput As String
Dim BlankRow As Long
BlankRow = Range("A65536").End(xlUp).Row + 1
Cells(BlankRow, 1).Select
QtyInput = InputBox("please Enter Company Name")
ActiveRow.Font.Bold = True
ActiveSheet.Range("ActiveCell").Value = QtyEntry
End Sub

How do I make this work?

Thanks in advance.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Try this:
Code:
Sub Find_Blank_Row()
 Dim QtyInput As String
 Dim BlankRow As Long
 BlankRow = Cells(Rows.Count, "A").End(xlUp).Row + 1
 QtyInput = InputBox("Please Enter Company Name")
 Cells(BlankRow, 1).Font.Bold = True
 Cells(BlankRow, 1).Value = QtyInput
 End Sub
 
Upvote 0
Try this:
Code:
Sub Find_Blank_Row()
 Dim QtyInput As String
 Dim BlankRow As Long
 BlankRow = Cells(Rows.Count, "A").End(xlUp).Row + 1
 QtyInput = InputBox("Please Enter Company Name")
 Cells(BlankRow, 1).Font.Bold = True
 Cells(BlankRow, 1).Value = QtyInput
 End Sub

Thank you, this works perfectly.
 
Upvote 0

Forum statistics

Threads
1,215,506
Messages
6,125,189
Members
449,213
Latest member
Kirbito

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top