putting new data in all columns in new row

littlepete

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

let me apologise first for not having a good day... too many things just do not work...

i'm working on an inputbox to fill in new data in an empty new row below the last used one.
but the simplest range this column and row 4 does not work !

i must honestly say that google is really not helping with all the fake besides the question and nothing less then really wrong answers...

so this is what i have (problem in bold) :

VBA Code:
dezerij = 4
dezekolom = 11

For dezekolom = 11 To 51

keuze = InputBox(Chr(10) & _
    "Deze lijst bevat " & aantalcontacten & " contacten." & Chr(10) & Chr(10) & _
[B]    Range(CStr(dezekolom) & "4").Value & " invullen: ... " & _[/B]
    Chr(10) & Chr(10) & _
    "tik hier de nieuwe data in.", "NIEUWE GEGEVENS", 10000, 5000)

Select Case keuze
    Case Len(keuze) = 0
        GoTo volgende
    Case 0
        tooneersterij
End Select

With Worksheets("gegevens")
[B]Cells(nieuwerij, dezekolom).Value = keuze[/B]
End With
MsgBox dezekolom & " - " & dezerij & " en " & Range("k4").Value & " + " & nieuwerij
volgende:
dezekolom = dezekolom + 1

Next dezekolom

english: dezerij=thisrow ; dezekolom=this column ; nieuwerij = new row

hopeful...
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
make "cells" instead of "range", as you work with numbers
VBA Code:
 Chr(10) & Chr(10) & Cells(4, dezekolom).Value & " invullen: ... " & Ch
 
Upvote 0
Solution
make "cells" instead of "range", as you work with numbers
VBA Code:
 Chr(10) & Chr(10) & Cells(4, dezekolom).Value & " invullen: ... " & Ch

thank you for the help !!!

ashamed that it is sooo easy, and: i discovered already range column row but cells row column... that's fixed to :)

next assignment: adjust the title of the inputbox with the column header and then copy all formula to the last row :)

thank you verrrrrry much !!!
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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