Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default Referencing a Worksheet

I am trying to insert data into a worksheet based on users input. I
want to get an input TodaysDate get its value and insert the data that
they put into the form into that worksheet which is named the same as
the Date. I have a workbook with 31 sheets for the corresponding 31
days in December and they will input the date on the form and I want it
to go to the worksheet with the same date. Here is my idea in code but
I need help making it work.

TodaysDate = Insertdata.Range("D2").Value
newwrksheet.Name = TodaysDate

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Referencing a Worksheet

How about this idea where you just input a day number 1-31 in cell h2.
Assumes sheet name formatted as 12-09-06. This could be placed in a
worksheet change event to be automatic.

Sub gotodaysht()
If Range("H2") < 10 Then y = "0"
x = "12-" & y & Range("h2") & "-06"
Sheets(x).Select
End Sub


--
Don Guillett
SalesAid Software

"newguy" wrote in message
ups.com...
I am trying to insert data into a worksheet based on users input. I
want to get an input TodaysDate get its value and insert the data that
they put into the form into that worksheet which is named the same as
the Date. I have a workbook with 31 sheets for the corresponding 31
days in December and they will input the date on the form and I want it
to go to the worksheet with the same date. Here is my idea in code but
I need help making it work.

TodaysDate = Insertdata.Range("D2").Value
newwrksheet.Name = TodaysDate



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default Referencing a Worksheet

That will work but I am trying to make it so I dont need to up data the
code every month and with your method I will need to change the value
of the month every month. Also in your code is it setting x =
12-12-09-03 Since the value in Range h2 will equal 12-09 and you are
going to concatenate it with "12-" and "-06"

Thank you for your help


Don Guillett wrote:
How about this idea where you just input a day number 1-31 in cell h2.
Assumes sheet name formatted as 12-09-06. This could be placed in a
worksheet change event to be automatic.

Sub gotodaysht()
If Range("H2") < 10 Then y = "0"
x = "12-" & y & Range("h2") & "-06"
Sheets(x).Select
End Sub


--
Don Guillett
SalesAid Software

"newguy" wrote in message
ups.com...
I am trying to insert data into a worksheet based on users input. I
want to get an input TodaysDate get its value and insert the data that
they put into the form into that worksheet which is named the same as
the Date. I have a workbook with 31 sheets for the corresponding 31
days in December and they will input the date on the form and I want it
to go to the worksheet with the same date. Here is my idea in code but
I need help making it work.

TodaysDate = Insertdata.Range("D2").Value
newwrksheet.Name = TodaysDate


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Referencing a Worksheet


As you can see and as I said, I designed it to put in 1-31. You can easily
change the code to input 12-09 if you like and change the x line
accordingly.

--
Don Guillett
SalesAid Software

"newguy" wrote in message
ups.com...
That will work but I am trying to make it so I dont need to up data the
code every month and with your method I will need to change the value
of the month every month. Also in your code is it setting x =
12-12-09-03 Since the value in Range h2 will equal 12-09 and you are
going to concatenate it with "12-" and "-06"

Thank you for your help


Don Guillett wrote:
How about this idea where you just input a day number 1-31 in cell h2.
Assumes sheet name formatted as 12-09-06. This could be placed in a
worksheet change event to be automatic.

Sub gotodaysht()
If Range("H2") < 10 Then y = "0"
x = "12-" & y & Range("h2") & "-06"
Sheets(x).Select
End Sub


--
Don Guillett
SalesAid Software

"newguy" wrote in message
ups.com...
I am trying to insert data into a worksheet based on users input. I
want to get an input TodaysDate get its value and insert the data that
they put into the form into that worksheet which is named the same as
the Date. I have a workbook with 31 sheets for the corresponding 31
days in December and they will input the date on the form and I want it
to go to the worksheet with the same date. Here is my idea in code but
I need help making it work.

TodaysDate = Insertdata.Range("D2").Value
newwrksheet.Name = TodaysDate




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
REFERENCING WORKSHEET CELL FROM VISUAL FOXPRO FORM Alan Excel Discussion (Misc queries) 0 July 7th 06 08:05 AM
Referencing a dropdown box on a worksheet Gene Excel Discussion (Misc queries) 1 November 23rd 05 04:48 PM
Referencing a worksheet name Greg114 Excel Worksheet Functions 3 March 23rd 05 10:23 PM
Copy from worksheet to another x times Union70 Excel Discussion (Misc queries) 0 March 7th 05 09:03 PM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM


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