View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
MacroLearning MacroLearning is offline
external usenet poster
 
Posts: 14
Default Change Cell Values

Thank you. This worked great.

Another question please:

I tried to add the following statement to that procedure and am getting an
error. Can't figure how to bypass it.

Dim MonthYear As String, Title As String
Dim ChangeMonth As Variant
MonthYear = "Enter the Month and Year of this Report"
Title = "Update Month"
ChangeMonth = Application.InputBox(MonthYear, Title)
With Worksheets("Detail").Range("A4")
..Value = ChangeMonth & " " & .Text
End With
With ActiveSheet
With Worksheets("Summary").Range("A4")
..Value = ChangeMonth & " " & .Text
End With
===With Active.Sheet.Range("C8").Value = ChangeMonth&.Text<<===
End With

"Tom Ogilvy" wrote:

Dim MonthYear As String, Title As String
Dim ChangeMonth As Variant
MonthYear = "Enter the Month and Year of this Report"
Title = "Update Month"
ChangeMonth = Application.InputBox(MonthYear, Title)
With Worksheets("Detail").Range("A4")
.Value = ChangeMonth & " " & .Text
End with
With Worksheets("Summary").Range("A4")
.Value = ChangeMonth & " " & .Text
End With
--
Regards,
Tom Ogilvy



"MacroLearning" wrote:

I figured out how to change the cell value via an input box. How can I write
this macro so that it will input the string in the cell before text already
there.

Here is what I have:

Dim MonthYear As String, Title As String
Dim ChangeMonth As Variant
MonthYear = "Enter the Month and Year of this Report"
Title = "Update Month"
ChangeMonth = Application.InputBox(MonthYear, Title)
Worksheets("Detail").Range("A4").Value = ChangeMonth
Worksheets("Summary").Range("A4").Value = ChangeMonth

I'd like to add something like

ChangeMonth 2007

Thanks