LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default UserForm past data

I have a series of cells on a worksheet which when clicked on open a
DialogBox. The DialogBox has ListBox which references another worksheet in
the same workbook, when I click OK it deposits the ListBox value into the
triggering cell. All of this works great, except, I also need to maintain
the font formatting (color) when it places the value in the triggering cell.
Is there any way to modify the code below to accomplish this?






Private Sub CommandButton1_Click()

'This UserForm is used to populate the Operator to Cover section of the
worksheet

On Error GoTo EndMacro

Friday_Routes_to_Cover.Hide
DoEvents

Dim rng

Set rng = Cells(ActiveCell.Row, 1)

rng(1, 4).Value = ListBox1.List(ListBox1.ListIndex, 0)
rng(1, 7).Value = ListBox1.List(ListBox1.ListIndex, 1)
rng(1, 10).Value = ListBox1.List(ListBox1.ListIndex, 2)
rng(1, 13).Value = ListBox1.List(ListBox1.ListIndex, 3)

rng(1, 6).Value = ListBox1.List(ListBox1.ListIndex, 13)
rng(1, 9).Value = ListBox1.List(ListBox1.ListIndex, 14)
rng(1, 12).Value = ListBox1.List(ListBox1.ListIndex, 15)
rng(1, 15).Value = ListBox1.List(ListBox1.ListIndex, 16)


Unload Friday_Routes_to_Cover

EndMacro:

Unload Friday_Routes_to_Cover

End Sub

 
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
Past the total of select multi row data Qazi Ahmad Excel Discussion (Misc queries) 1 January 10th 07 02:57 PM
Search then copy and past data joecrabtree Excel Programming 3 December 8th 06 03:18 PM
How do you copy and past data from one spreadsheet to another? trainer07 Excel Discussion (Misc queries) 1 August 9th 06 07:21 PM
Count data based on past dates JimDandy Excel Worksheet Functions 7 June 28th 06 03:59 PM
Past directly into TextBox on UserForm DonB[_2_] Excel Programming 2 December 12th 03 02:01 AM


All times are GMT +1. The time now is 11:09 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"