Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
to explain it better then trying to explain it, do this below..
here... this is probably SO not right ... but hey it works.. tell me what i could use to not have to hit space bar to update sheet 1 everytime (original is web queried but whats below will give you and idea of the problem im having). open a new workbook.. fill sheet2 with numbers all over it (up to F20 squared). put this in the vba or mvb. ( its at bottom of post) but read on and go back to sheet 2 find any blank area click it and press spacebar. can I eliminate pressing the spacebar?? I need an auto update every 1 min. pressing the space bar everyminute...its ghetto like. ( but so is my script i guess lol hey it works... almost) heres my ghetto script, remember I am 3 days new at vba or mvb. --------------- Private Sub Worksheet_SelectionChange(ByVal Target As Range) x = Sheets("sheet1").Range("a65536").End(xlUp).Row + 1 Sheets("sheet1").Range("a" & x) = Range("a1") x = Sheets("sheet1").Range("b65536").End(xlUp).Row + 1 Sheets("sheet1").Range("b" & x) = Range("b2") x = Sheets("sheet1").Range("c65536").End(xlUp).Row + 1 Sheets("sheet1").Range("c" & x) = Range("c2") x = Sheets("sheet1").Range("d65536").End(xlUp).Row + 1 Sheets("sheet1").Range("d" & x) = Range("c4") x = Sheets("sheet1").Range("e65536").End(xlUp).Row + 1 Sheets("sheet1").Range("e" & x) = Range("c5") x = Sheets("sheet1").Range("f65536").End(xlUp).Row + 1 Sheets("sheet1").Range("f" & x) = Range("c6") x = Sheets("sheet1").Range("g65536").End(xlUp).Row + 1 Sheets("sheet1").Range("g" & x) = Range("c7") x = Sheets("sheet1").Range("h65536").End(xlUp).Row + 1 Sheets("sheet1").Range("h" & x) = Range("c8") x = Sheets("sheet1").Range("i65536").End(xlUp).Row + 1 Sheets("sheet1").Range("i" & x) = Range("c9") x = Sheets("sheet1").Range("j65536").End(xlUp).Row + 1 Sheets("sheet1").Range("j" & x) = Range("c10") x = Sheets("sheet1").Range("k65536").End(xlUp).Row + 1 Sheets("sheet1").Range("k" & x) = Range("c11") x = Sheets("sheet1").Range("l65536").End(xlUp).Row + 1 Sheets("sheet1").Range("l" & x) = Range("c12") x = Sheets("sheet1").Range("m65536").End(xlUp).Row + 1 Sheets("sheet1").Range("m" & x) = Range("c13") x = Sheets("sheet1").Range("n65536").End(xlUp).Row + 1 Sheets("sheet1").Range("n" & x) = Range("c14") x = Sheets("sheet1").Range("o65536").End(xlUp).Row + 1 Sheets("sheet1").Range("o" & x) = Range("c15") x = Sheets("sheet1").Range("p65536").End(xlUp).Row + 1 Sheets("sheet1").Range("p" & x) = Range("c16") x = Sheets("sheet1").Range("q65536").End(xlUp).Row + 1 Sheets("sheet1").Range("q" & x) = Range("c17") x = Sheets("sheet1").Range("r65536").End(xlUp).Row + 1 Sheets("sheet1").Range("r" & x) = Range("c18") x = Sheets("sheet1").Range("s65536").End(xlUp).Row + 1 Sheets("sheet1").Range("s" & x) = Range("c19") End Sub thanks!!! I promise I wont clutter the message boards up with questions after this. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
nice I left out...
look at sheet 1 and your number should be there.. after pressing the space bar in sheet 2 thats all right, but pressing the space bar very minute isnt fun. need automation, every 1 min. thanks again ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
does it have to do with this line??
Private Sub Worksheet_change(ByVal Target As Range) "change"?? I changed it to Worksheet_selection change and it would only update with my mouse?? moving the mouse to another cell (keyboard didnt work then). looked back at sheet 1 and the entries were there. so i changed it back to Worksheet_change now its back to keyboard again..? need auto update/ hands free tho. thanks. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Look at Chip Pearson's site for information on Application.OnTime
http://www.cpearson.com/excel/ontime.htm -- Regards, Tom Ogilvy 0o0o0 wrote in message ... does it have to do with this line?? Private Sub Worksheet_change(ByVal Target As Range) "change"?? I changed it to Worksheet_selection change and it would only update with my mouse?? moving the mouse to another cell (keyboard didnt work then). looked back at sheet 1 and the entries were there. so i changed it back to Worksheet_change now its back to keyboard again..? need auto update/ hands free tho. thanks. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
but im gettin... constants fixed length strings, arrays user defined
types and declare statements not allowed as public members of object modules. thats for the USING WINDOWS TIMERS the ontime technique the site gives me.. just keeps coming up cant use constants error. any other suggestions .. im up for anything! thanks ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you are putting the declaration in a class module (or a sheet module, the
ThisWorkbook module, or a Userform module), change the declarations from Public Function to Private Function. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "0o0o0" wrote in message ... but im gettin... constants fixed length strings, arrays user defined types and declare statements not allowed as public members of object modules. thats for the USING WINDOWS TIMERS the ontime technique the site gives me.. just keeps coming up cant use constants error. any other suggestions .. im up for anything! thanks ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
not sure if i'm using the right thing | Excel Worksheet Functions | |||
A most ghetto-fabulous GetSourceData | Charts and Charting in Excel | |||
Oh, just one more thing | Excel Discussion (Misc queries) | |||
One Last Thing | Excel Discussion (Misc queries) | |||
Is there such a thing... | Excel Discussion (Misc queries) |