Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Populating Cells in a row.

I am using this code to put the value of EPLCRef1TextBox & "-"
EPLCRef2TextBox into the next empty cell in column "C" starting at Ro
10.

Private Sub AuditDetailsCompleteCommandButton_Click()
With Worksheets("DUMP")
Application.ScreenUpdating = False

Range("C" & Rows.Count).End(xlUp).Offset(1, 0).Select
If Selection.Row < 10 Then Range("A10").Select
ActiveCell.Value = EPLCRef1TextBox & "-" & EPLCRef2TextBox
End With
Application.ScreenUpdating = True
End Sub

I then want to add the contents of UseThis1TextBox to the next cell o
the Right and todays Date into the cell next to that. I also want to ad
a few more TextBox Values to the right of this.

Can someone please tell me how to do this in VBA.

Cheer

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Populating Cells in a row.

Range("C" & Rows.Count).End(xlUp).Offset(1, 0).Select
If Selection.Row < 10 Then Range("A10").Select
ActiveCell.Value = EPLCRef1TextBox & "-" & EPLCRef2TextBox
End With
ActiveCell.Offset(0,1).Value = UseThis1TextBox.Text
ActiveCell.Offset(0,2).Value = Date

Application.ScreenUpdating = True
End Sub

--
Regards,
Tom Ogilvy


"Jako " wrote in message
...
I am using this code to put the value of EPLCRef1TextBox & "-" &
EPLCRef2TextBox into the next empty cell in column "C" starting at Row
10.

Private Sub AuditDetailsCompleteCommandButton_Click()
With Worksheets("DUMP")
Application.ScreenUpdating = False

Range("C" & Rows.Count).End(xlUp).Offset(1, 0).Select
If Selection.Row < 10 Then Range("A10").Select
ActiveCell.Value = EPLCRef1TextBox & "-" & EPLCRef2TextBox
End With
Application.ScreenUpdating = True
End Sub

I then want to add the contents of UseThis1TextBox to the next cell on
the Right and todays Date into the cell next to that. I also want to add
a few more TextBox Values to the right of this.

Can someone please tell me how to do this in VBA.

Cheers


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Populating Cells in a row.

Thanks Tom , Only trouble is that the date is mm/dd/yy.

So todays date read 08/01/04, what i want it to read is 01/07/2004.

I have tried =format(date, "dd/mm/yyyy" but to no avail, Excel seem
to insist that i use mm-dd-yy !!

Any ideas

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Populating Cells in a row.

DOH !! sorry of course i meant 01/08/2004 not 01/07/2004.

Cheer

--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Populating Cells in a row.

Range("C" & Rows.Count).End(xlUp).Offset(1, 0).Select
If Selection.Row < 10 Then Range("A10").Select
ActiveCell.Value = EPLCRef1TextBox & "-" & EPLCRef2TextBox
End With
ActiveCell.Offset(0,1).Value = UseThis1TextBox.Text
ActiveCell.Offset(0,2).Value = Date
ActiveCell.Offset(0,2).NumberFormat = "dd/mm/yyyy"
Application.ScreenUpdating = True
End Sub

--
Regards,
Tom Ogilvy


"Jako " wrote in message
...
DOH !! sorry of course i meant 01/08/2004 not 01/07/2004.

Cheers


---
Message posted from http://www.ExcelForum.com/





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Populating Cells in a row.

After you populate the cell, give it the numberformat you want:

ActiveCell.Offset(0,2).Value = Date
ActiveCell.Offset(0,2).numberformat = "dd/mm/yyyy"

or
with ActiveCell.Offset(0,2)
.Value = Date
.numberformat = "dd/mm/yyyy"
end with

(to save your fingers)

"Jako <" wrote:

Thanks Tom , Only trouble is that the date is mm/dd/yy.

So todays date read 08/01/04, what i want it to read is 01/07/2004.

I have tried =format(date, "dd/mm/yyyy" but to no avail, Excel seems
to insist that i use mm-dd-yy !!

Any ideas?

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Populating Cells in a row.

Worked a treat Tom !!

Many thanks (and to Dave also

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Populating Cells rciolkosz Excel Discussion (Misc queries) 3 August 27th 08 06:54 PM
Randomly populating empty cells with other text cells Throme88 Excel Discussion (Misc queries) 3 July 1st 08 02:58 PM
Populating Cells from One Worksheet to Another... maura Excel Worksheet Functions 2 May 19th 07 07:58 PM
Populating several cells A Excel Worksheet Functions 1 September 15th 05 05:58 PM
Populating cells Kevin Stecyk Excel Programming 3 December 4th 03 06:24 PM


All times are GMT +1. The time now is 03:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"