Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Ghetto script - need help! one last thing

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Ghetto script - need help! one last thing

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Ghetto script - need help! one last thing

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Ghetto script - need help! one last thing

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Ghetto script - need help! one last thing

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Ghetto script - need help! one last thing

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
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
not sure if i'm using the right thing Tiffany Excel Worksheet Functions 4 September 19th 08 05:21 PM
A most ghetto-fabulous GetSourceData Taylor Charts and Charting in Excel 3 August 18th 08 01:54 PM
Oh, just one more thing Mike[_12_] Excel Discussion (Misc queries) 1 July 27th 08 04:32 AM
One Last Thing Coltsfan Excel Discussion (Misc queries) 1 January 16th 06 08:42 PM
Is there such a thing... Tom Excel Discussion (Misc queries) 1 April 19th 05 01:38 AM


All times are GMT +1. The time now is 12:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"