Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Update Sheet Where...


I'm sorry if this thread exists, but I've looked everywhere and can'
find out how to do this. I have a set of data, B2:J2 are names o
employees. A2:A30 are dates. I have a userform that has a listbox fo
the names and a textbox for the dates. What I want to know is how I ca
make the form update my sheet where the specific date and nam
conditions are met. So, say I had info for John on 8/16/06. I wan
the form to full in that information when ok is clicked. Any ideas?
I'm sure it's simple, but I'm not that great with VBA, and I can't fin
any examples to work from. Thanks

--
Isildurx5
-----------------------------------------------------------------------
Isildurx51's Profile: http://www.excelforum.com/member.php...fo&userid=3752
View this thread: http://www.excelforum.com/showthread.php?threadid=57166

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Update Sheet Where...


Not clear on what you are trying to achieve or the conditions you
mentioned can you give some more details?


--
SandyUK
------------------------------------------------------------------------
SandyUK's Profile: http://www.excelforum.com/member.php...o&userid=17487
View this thread: http://www.excelforum.com/showthread...hreadid=571663

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default VBA Update Sheet Where...

dim myCol as variant
dim myRow as variant
dim myDate as date

mydate = cdate(me.combobox1.value)

with worksheets("somesheetnamehere")
mycol = application.match(me.listbox1.value, .range("b2:J2"),0)
myRow = application.match(clng(mydate), .range("a3:a30"),0)

if isnumeric(mycol) _
and isnumeric(myrow) then
.Range("A2").offset(myrow,mycol).value = me.textbox33.value
else
beep
end if
end with

Untested, uncompiled. Watch for typos.

I think I'd use a combobox with the dates already defined from the worksheet (or
another listbox). But I'd stay away from a textbox--too much validation would
have to be done.




Isildurx51 wrote:

I'm sorry if this thread exists, but I've looked everywhere and can't
find out how to do this. I have a set of data, B2:J2 are names of
employees. A2:A30 are dates. I have a userform that has a listbox for
the names and a textbox for the dates. What I want to know is how I can
make the form update my sheet where the specific date and name
conditions are met. So, say I had info for John on 8/16/06. I want
the form to full in that information when ok is clicked. Any ideas?
I'm sure it's simple, but I'm not that great with VBA, and I can't find
any examples to work from. Thanks.

--
Isildurx51
------------------------------------------------------------------------
Isildurx51's Profile: http://www.excelforum.com/member.php...o&userid=37520
View this thread: http://www.excelforum.com/showthread...hreadid=571663


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Update Sheet Where...


Thanks very much. Still trying to implement the code, but I think
have a basic idea of how to do it. I'm fairly new to VBA, so I've go
a giant learning curve. :cool

--
Isildurx5
-----------------------------------------------------------------------
Isildurx51's Profile: http://www.excelforum.com/member.php...fo&userid=3752
View this thread: http://www.excelforum.com/showthread.php?threadid=57166

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
Update a autofilter sheet from another sheet Don Excel Discussion (Misc queries) 1 June 18th 08 12:57 PM
Update from different sheet shakey1181 Excel Discussion (Misc queries) 0 May 15th 07 02:38 PM
insert query into excell sheet to update excell sheet and pivot table vbsolo Excel Discussion (Misc queries) 0 August 24th 05 12:41 PM
Update a sheet Alvin Hansen[_2_] Excel Programming 3 January 18th 05 02:05 PM
Sheet Update Help tiptop[_5_] Excel Programming 2 July 26th 04 04:00 AM


All times are GMT +1. The time now is 10:10 PM.

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"