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

Hi I have a userform and I have a text box called txtname

I would like to add txtname to a sheet called sheet7 in row 1's first
available column.

can you tell me how I can do this?

I know how to add it to the next available row in a column but not the next
available column in a row.

Thanks,

Rob



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default first column in row

Rob,

sounds like you are looking for something like this

Dim rw as long, col as long

col = Sheets(1).Cells(rw, Columns.Count).End(xlToLeft).Column

--
steveB

Remove "AYN" from email to respond
"Rob Hargreaves" wrote in message
...
Hi I have a userform and I have a text box called txtname

I would like to add txtname to a sheet called sheet7 in row 1's first
available column.

can you tell me how I can do this?

I know how to add it to the next available row in a column but not the
next available column in a row.

Thanks,

Rob





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default first column in row

or to take it to the cell

Sheets(1).Cells(1, Columns.Count).End(xlToLeft).Value = txtName.Text

--
HTH

Bob Phillips

"STEVE BELL" wrote in message
news:y2wDe.23041$IJ1.14564@trnddc02...
Rob,

sounds like you are looking for something like this

Dim rw as long, col as long

col = Sheets(1).Cells(rw, Columns.Count).End(xlToLeft).Column

--
steveB

Remove "AYN" from email to respond
"Rob Hargreaves" wrote in message
...
Hi I have a userform and I have a text box called txtname

I would like to add txtname to a sheet called sheet7 in row 1's first
available column.

can you tell me how I can do this?

I know how to add it to the next available row in a column but not the
next available column in a row.

Thanks,

Rob







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
divide column(x) by column(y) to give column(x/y) in excel? James New Users to Excel 2 April 24th 23 11:46 AM
Calculating column A * column B = Results in another column jhun Excel Worksheet Functions 2 March 30th 10 05:13 AM
Referencing date column A & time column B to get info from column TVGuy29 Excel Discussion (Misc queries) 1 January 24th 08 09:50 PM
Return text in Column A if Column B and Column K match jeannie v Excel Worksheet Functions 4 December 13th 07 07:36 PM
Based on a condition in one column, search for a year in another column, and display data from another column in the same row look [email protected] Excel Discussion (Misc queries) 1 December 27th 06 05:47 PM


All times are GMT +1. The time now is 08:31 AM.

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

About Us

"It's about Microsoft Excel"