column header in inputbox title

littlepete

Well-known Member
Joined
Mar 26, 2015
Messages
503
Office Version
  1. 365
Platform
  1. Windows
hello :)


slowly we achieve everything we want:

making an inputbox to input all new data in a new row below the last one, so far all good.
I would like to have the title of the inputbox say "FILLING IN FIRST NAME" when prompted to fill in the first name,
"FILLING IN LAST NAME" for last name and so on...

the headers are in row 4 so far i have this:

Rich (BB code):
keuze = InputBox(Chr(10) & _
    "Deze lijst bevat " & aantalcontacten & " contacten." & Chr(10) & Chr(10) & _
    Cells(4 & dezekolom).Value & " invullen: ... " & _
    Chr(10) & Chr(10) & _
    "tik hier de nieuwe data in.", Cells(4 & dezekolom), 10000, 5000)

the address in the last line works well :) but the text in line 3 to put the header of the current column in the inputbox does not...

who has a good idea :) ? thank you !!!
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Perhaps like InputBox("Answer?", "Name of " & Worksheets("Sheet6").Range("B" & 1))
or

Dim i As Integer
i = 3
choice = InputBox("Answer?", "Name of " & Cells(1, i))
 
Upvote 0
Perhaps like InputBox("Answer?", "Name of " & Worksheets("Sheet6").Range("B" & 1))
or

Dim i As Integer
i = 3
choice = InputBox("Answer?", "Name of " & Cells(1, i))

hello

i know in general how the inputbox is made, but it's the pointing at the headers that is the problem...

in the inputbox i want the title of that column (for ex "name") that is in K4 to be put in the inputbox...

it does not :( dezekolom (this column) is the variable that in the loop gets +1 to pass through all columns (11 to 51).
so in the box the text "filling in Cells(4 & dezekolom).Value : ... " meaning fill in the name should work...
 
Upvote 0
What I posted returned the header in the input box title for me. Perhaps you overlooked that part?
I do think you missed that I pointed out that the Cells address parts need to be separated by a comma. Yours is not.
Cells(1, i))
 
Upvote 0
Solution
, or ; america versus europe lol ... thanks for the pointing that out !!! have a nice evening :) !!!
 
Upvote 0
hello :)

thank you for the tips ;) !!!
the inputbox is now working perfectly: looping from the first column to the last,
putting the header of that column in the box title and filling in all data nicely :) !

last problem was indeed the cells(thisrow, thiscolumn) and NOT : cells(thisrow & thiscolumn) !

thank you :) !!!
 
Upvote 0

Forum statistics

Threads
1,213,527
Messages
6,114,140
Members
448,551
Latest member
Sienna de Souza

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