![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Posts: 117
|
Hi-
Im using the following code to insert text into a cell 10 columns to the right of the date cell. Sheets ("balance sheet").select Range("d5").Select While ActiveCell.Value <> Int(Now) ActiveCell.Offset(1, 0).Select Wend ActiveCell.Offset(0, 10).Value = TextBox1.Text End With The problem is that I do not want to show the "balance sheet" when this command takes place. How do I write or fix this code so that when I press the commandbutton on the userform, the code lists textbox1.text , but does not show me the "balance sheet"? thanks! |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sunny, spring-like Hull
Posts: 3,339
|
You could try something like this (I commented out the 'End With' piece of your code as I'm not sure why it's there): -
Dim SheetName As String SheetName = ActiveSheet.Name Application.ScreenUpdating = False Sheets("balance sheet").Select Range("d5").Select While ActiveCell.Value <> Int(Now) ActiveCell.Offset(1, 0).Select Wend ActiveCell.Offset(0, 10).Value = TextBox1.Text 'End With Sheets("" & SheetName & "").Select Application.ScreenUpdating = True [ This Message was edited by: Mudface on 2002-03-04 08:24 ] |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Posts: 117
|
Thanks, it worked
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|