Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Function doesn't work correctly with protection on



Function commenttext2(incell As String) As String
If incell " " Then commenttext2 = InputBox("Please enter you
datasheet comment for" & " " & " " & ActiveSheet.Range("c41").Value)
End Function


I have this function set so when the user enters a number into cel
B41, they are prompted with an inputBox. Works great withou
protection. It works with protection, but only when I go to Save o
Exit the spreadsheet.

Ideas

--
BigDav
-----------------------------------------------------------------------
BigDave's Profile: http://www.excelforum.com/member.php...nfo&userid=774
View this thread: http://www.excelforum.com/showthread.php?threadid=37910

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Function doesn't work correctly with protection on


If the sheet is protected with the default protection, they won't b
able to change the comments. When you protect the sheet, allow them t
"Edit Objects"

HT

--
tkstoc

-----------------------------------------------------------------------
tkstock's Profile: http://www.excelforum.com/member.php...fo&userid=1444
View this thread: http://www.excelforum.com/showthread.php?threadid=37910

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Function doesn't work correctly with protection on

I don't know if this will help but pass C41 as an argument.

As it stands now, your function will always ask for a comment about
cell C41. In general, it is a very, very bad idea to write a user
defined function that works with cells/valures other than those passed
as arguments.

Function CommentText2(aStr as string, RefString as string),
where RefString will contain the value of C41.

This function would now be used as =CommentText2(B41,C41)

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...


Function commenttext2(incell As String) As String
If incell " " Then commenttext2 = InputBox("Please enter your
datasheet comment for" & " " & " " & ActiveSheet.Range("c41").Value)
End Function


I have this function set so when the user enters a number into cell
B41, they are prompted with an inputBox. Works great without
protection. It works with protection, but only when I go to Save or
Exit the spreadsheet.

Ideas?


--
BigDave
------------------------------------------------------------------------
BigDave's Profile:
http://www.excelforum.com/member.php...fo&userid=7741
View this thread: http://www.excelforum.com/showthread...hreadid=379105


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Function doesn't work correctly with protection on



Function commentText2(astr As String, refstring As String)
refstring = c41
astr = b41
If astr " " Then commentText2 = InputBox("Please enter your datasheet
comment for" & " " & " " & refstring)
End Function


Is this the correct way to go about it? (How green am I?)


--
BigDave
------------------------------------------------------------------------
BigDave's Profile: http://www.excelforum.com/member.php...fo&userid=7741
View this thread: http://www.excelforum.com/showthread...hreadid=379105

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Function doesn't work correctly with protection on


Okay...code works now. The calculation mode was set to manual b
another proceedure. But, I'm not in the clear yet.

I'm still curious about alternatives to comment prompts were discussin
here, but I'll sort out my new problem in another thread.

Thanks for all of the help

--
BigDav
-----------------------------------------------------------------------
BigDave's Profile: http://www.excelforum.com/member.php...nfo&userid=774
View this thread: http://www.excelforum.com/showthread.php?threadid=37910



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
SMALL function seems not to work correctly hdf Excel Worksheet Functions 13 February 16th 08 02:38 PM
Sorting numbers doesn't work correctly GrammyEmmy New Users to Excel 8 June 25th 06 11:45 PM
How do I get Auto-Fit to work correctly? Mickey Dunne Excel Worksheet Functions 0 May 11th 06 01:47 AM
custom filter does not work correctly RJ Excel Discussion (Misc queries) 1 September 9th 05 07:34 PM
RunAutoMacros does not work correctly from vbscript! Juha Vehvilainen Excel Programming 2 January 3rd 04 02:11 AM


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