Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Inputbox information sent to cell A2

Hi Everyone
I know nothing in macro except the recorder, below is something I am trying
to do.
first part to erase cells is working fine but the inputbox I can't seem to
make it work.
Can someone help me please.
Regards
John

Range("R65:R103").Select
Selection.ClearContents
Range("e6").Select
Dim myCell As Range
myCell = InputBox("What Year to display?")
Set myCell = Worksheets("Sheet1").Range("A2")

End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Inputbox information sent to cell A2

Very close John
try:

Dim myCell As Range
Set myCell = Worksheets("Sheet1").Range("A2")
myCell.value = InputBox("What Year to display?")

Cheers
Simon
Blog: www.smurfonspreadsheets.net



John wrote:
Hi Everyone
I know nothing in macro except the recorder, below is something I am
trying to do.
first part to erase cells is working fine but the inputbox I can't seem
to make it work.
Can someone help me please.
Regards
John

Range("R65:R103").Select
Selection.ClearContents
Range("e6").Select
Dim myCell As Range
myCell = InputBox("What Year to display?")
Set myCell = Worksheets("Sheet1").Range("A2")

End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Inputbox information sent to cell A2

Thank you very much Simon
It works great.
Regards
John
"Simon Murphy" wrote in message
...
Very close John
try:

Dim myCell As Range
Set myCell = Worksheets("Sheet1").Range("A2")
myCell.value = InputBox("What Year to display?")

Cheers
Simon
Blog: www.smurfonspreadsheets.net



John wrote:
Hi Everyone
I know nothing in macro except the recorder, below is something I am
trying to do.
first part to erase cells is working fine but the inputbox I can't seem
to make it work.
Can someone help me please.
Regards
John

Range("R65:R103").Select
Selection.ClearContents
Range("e6").Select
Dim myCell As Range
myCell = InputBox("What Year to display?")
Set myCell = Worksheets("Sheet1").Range("A2")

End Sub


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
put inputbox input into a cell Dave F Excel Programming 5 April 23rd 07 05:18 PM
Inputbox to pull cell location stvgarner Excel Programming 4 April 17th 06 08:06 PM
inputBox if cell " ? BigDave[_9_] Excel Programming 2 June 10th 05 09:36 PM
InputBox: Display Cell Content not Cell Ref ? MAS Excel Programming 3 July 11th 04 11:38 PM
From Cell to InputBox Robin Clay[_3_] Excel Programming 1 December 10th 03 12:56 PM


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